I’m working in the CI/CD field, specifically focusing on enhancing the Jenkins instance we use in the project I’m assigned to. Currently, Jenkins is deployed on an AWS EC2 instance (master node) and has 2 slave nodes on other 2 EC2 instances
In the project pipelines, there’s a step that uses ‘docker’ commands. The issue is that after some time, I encounter this 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/auth": dial unix /var/run/docker.sock: connect: permission denied
I’ve repeatedly accessed the slave nodes and executed the command:
sudo chmod 777 /var/run/docker.sock
This temporarily resolves the issue, but after a while, which I can’t quantify, the error reappears… Any suggestions?
Distro: Ubuntu 22