-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux support for access to docker.socket #1798
Comments
Got the same error today! |
In my setup, Instead, I was able to use act --container-options "--group-add $(stat -c %g /var/run/docker.sock)" ... |
Thank you, that solved the docker access issue. |
It still does not work, unfortunately. jonathan@work-pc:~/Projects/Professional/my-project$ gh act --container-options "--group-add $(stat -c %g /var/run/docker.sock)" pull_request
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock'
[Continuous Deployment - Content Migrations/Set the environment outputs] 🚀 Start image=catthehacker/ubuntu:act-latest
[Continuous Deployment - Docs/Set the environment outputs ] 🚀 Start image=catthehacker/ubuntu:act-latest
[Continuous Deployment - Storybook/Set the environment outputs ] 🚀 Start image=catthehacker/ubuntu:act-latest
[Continuous Integration/Lint the source code ] 🚀 Start image=catthehacker/ubuntu:act-latest
[Continuous Deployment - Storefront/Set the environment outputs ] 🚀 Start image=catthehacker/ubuntu:act-latest
[Continuous Deployment - Content Migrations/Set the environment outputs] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Continuous Deployment - Terraform/Set the environment outputs ] 🚀 Start image=catthehacker/ubuntu:act-latest
[Continuous Integration/Lint the source code ] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Continuous Integration/Unit test the packages ] 🚀 Start image=catthehacker/ubuntu:act-latest
[Continuous Deployment - Docs/Set the environment outputs ] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Continuous Deployment - Storybook/Set the environment outputs ] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Continuous Integration/Unit test the packages ] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Continuous Deployment - Storefront/Set the environment outputs ] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Continuous Deployment - Terraform/Set the environment outputs ] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
Error: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=catthehacker%2Fubuntu&tag=act-latest": dial unix /var/run/docker.sock: connect: permission denied Update It worked using the following command instead: gh act -P ubuntu-latest=-self-hosted |
Act version
0.2.45-10
Feature description
Unless by some chance the gid of docker group on host machine and runner image coincide the docker.socket will give permissions denied error when attempting to run docker build or similar command.
There are ways round this,
chown 1001 /var/run/docker.sock
chmod a+rw /var/run/docker.sock
But these might conflict with other needs, not survive a reboot.
It should be possible to read the
gid
of/var/run/docker.sock
on startup and add this value to the invocation of the runner image. (Seedocker run --group-add
).The text was updated successfully, but these errors were encountered: