I got the following error when i run docker build in a workflow using the self hosted runner
ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
the container has a mounted volume to /var/run/docker.sock and still got this error
to fix this, i have added the following step in the pipeline before calling docker build
- name: Give docker permissions
run: sudo chmod 666 /var/run/docker.sock
maybe some adjusts in the dockerfile for the gha-runner image fix this behaveiour
I got the following error when i run
docker buildin a workflow using the self hosted runnerERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission deniedthe container has a mounted volume to
/var/run/docker.sockand still got this errorto fix this, i have added the following step in the pipeline before calling
docker buildmaybe some adjusts in the dockerfile for the gha-runner image fix this behaveiour