[Pipeline] sh
- docker inspect -f . node:14-alpine
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.40/containers/node:14-alpine/json: dial unix /var/run/docker.sock: connect: permission denied
解决方法
[root@iZ2zec2d6e4jqs3hzra4mpbZ run]# groupadd docker
[root@iZ2zec2d6e4jqs3hzra4mpbZ jenkins]# cd /var/run
[root@iZ2zec2d6e4jqs3hzra4mpbZ run]# chmod 777 docker.sock
然后继续立即构建,成功