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
jenkins
[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.