Bitbucket Pipelines Docker Runner setup on Red Hat with Podman fails with permission denied
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
When conducting the initial configuration of Bitbucket Pipelines Docker Runner on a Red Hat system using Podman, it is possible to encounter the following error message in certain scenarios:
1
Error: statfs /var/run/docker.sock: permission denied
Environment
Bitbucket Pipelines Runners executing on Red Hat machines with Podman.
Diagnosis
When initiating the Runner hosted on a Red Hat machine utilizing Podman, one may encounter an error message as indicated in the Runner logs.
1
Error: statfs /var/run/docker.sock: permission denied
Cause
This issue is likely attributed to the improper installation of podman-docker when initiating the Runner. In the context of Red Hat systems and Podman, it is essential to have podman-docker installed as a critical dependency to ensure the Runner host starts correctly.
Solution
Open a new terminal session and proceed to install the podman-docker dependency by executing the following command:
1
podman machine ssh sudo rpm-ostree install podman-docker
⚠️ If you encounter an error similar to the one illustrated below while attempting to execute this command:
1
panic: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/_ping: dial unix /var/run/docker.sock: connect: permission denied
This is related to a known Podman issue. Please open the /etc/selinux/config file, and append the following line to it:
1
SELINUX=disabled
If the issue persists after following the steps above, please reach out to Atlassian support, or the Atlassian community for further assistance.
Was this helpful?