Hi - I am facing the following issue in Jenkins ver. 2.190.2.
I have installed docker plugin and setup a docker executor thru Manage Jenkins -> Configure System
I have set the agent correctly in Jenkinsfile and the checkout and build pipeline stages are executing correctly. However, when I run tests that involve creating temporary docker containers, the pipeline fails with error "panic: : dial unix: missing address"
I tried troubleshooting this and the slave container is not able to accessdiscovered its not able to access the host docker daemon. I verified in the container settings that the following mapping is present for volumes
/var/run/docker.sock:/var/run/docker.sock
I tried putting commands in Jenkinsfile e.g. docker images and I get
script returned exit code 1
Surprisingly though, if I docker exec into the same running container I am able to successfully run docker commands that access the host's docker daemon.
Only the docker commands in the Jenkinsfile are unable to access the host docker daemon. I also verified the container mounts using docker inspect and the volume mapping for docker.sock is present.
Some information about the environment
Host - Ubuntu 18.04 (AWS EC2)
Docker CE - 19.03
Jenkins 2.190.2
Any help is appreciated as I have exhausted all my options.