Using Docker in bazzite-dx, permission issues

Hey folks!

I’ve rebased into bazzite-dx-gnome, and Im trying to run docker. However I run into permission issues. Is this expected?

ramarivera@bazzite:~$ docker pull ubuntu
Using default tag: latest
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.50/images/create?fromImage=docker.io%2Flibrary%2Fubuntu&tag=latest": dial unix /var/run/docker.sock: connect: permission denied

You must be a member of group docker to use it. If you started on the non-dx image, then your user was not added to that group.

There should be a ujust dx-group command in Terminal (I’m not sure as I’m on Aurora DX) that configures permissions for docker, incus and libvirt. It’s there just for that use case when you rebase to DX from a non-DX image.

I looked for something like that or for devmode following some other posts, but there is no command like that in bazzite :frowning:

But diving into the source code for aurora, maybe if I do something like what is done here it would be enough?

could probably post an issue on the bazzite-dx github as there should be a ujust for adding the user to docker and other developer tools (bluefin and aurora dx have it)

1 Like

Good idea, done Missing ujust command to configure user groups · Issue #90 · ublue-os/bazzite-dx · GitHub

1 Like

I think in the interim if you create the docker group (it might not exist yet: “sudo groupadd docker” and then do “usermod -aG docker $USER” it should work? I might be misrem

1 Like

unfortunately, adding myself to the group did nothing

To add yourself to the docker group you usually need to

  • start docker (this creates the group if it’s missing) with sudo systemctl start docker (and if you need to enable the service: sudo systemctl enable docker)
  • add yourself to the said group usermod -aG docker $USER
  • relog … or just restart the terminal should be fine

that did the trick, thanks so much!

1 Like

When adding oneself to a new group, it usually won’t be available until we log out. But in the terminal, we can do the newgrp docker command. It will start a new shell inside the existing one and you will be member of the docker group. (Notice that the SHLVL environment variable, for shell level, will increase by 1.)

Here’s the umbrella issue: Build in DX groups/setup in the installation step · Issue #528 · ublue-os/packages · GitHub

TLDR we want to centralize this across all our images so we can make it a 1 reboot step instead of 2. This is one of the main reasons why bazzite-dx is still beta, just about everything else is finished. Would love to centralize the justfiles too.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.