Docker stuck in "rootless" mode on Rocky 9 (RHEL9)

in flag

I tried setting up podman in rootless mode on Rocky Linux 9, but after running into a number of issues I uninstalled everything and just went back to Docker. I'm using a number of hosts all provisioned the same way, as Jenkins build nodes. When I run docker run hello-world as the jenkins user on and of these hosts, it works without issue. However, when I run from Jenkins, they immediately fail with a message that indidcates it's trying to use the "user" socket instead of /var/run/docker.socket:

+ whoami
[Pipeline] sh
+ groups
users wheel mock docker
[Pipeline] sh
+ docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///run/user/10002/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

I made sure to revert any changes made during the rootless setup, including removing the entries for the Jenkins user in /etc/subuid and /etc/subgid. I also made sure to add export DOCKER_HOST="unix:///var/run/docker.sock" to ~/.bashrc but I still encounter this error. I am sure this is something rather obvious I've overlooked, but I just can't see to figure it out.

mx flag

I had the same problem with Podman. It took some time to figure out and I have detailed how to set up Podman as user (also on Rocky for me) here

I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.