jenkins在shell脚本运行docker权限报错问题
报错如下Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/arduino-cli/json: dial unix /var/ru
·
报错如下

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/arduino-cli/json: dial unix /var/run/docker.sock: connect: permission denied
Build step 'Execute shell' marked build as failure
Finished: FAILURE
解决办法:
sudo gpasswd -a jenkins docker
sudo usermod -a G docker jenkins
#最后
chmod 777 /var/run/docker.sock
解决问题
更多推荐
所有评论(0)