-
Bug
-
Resolution: Not A Defect
-
Critical
-
None
-
Jenkins 1.639
CloudBees Docker Pipeline 1.3
ubuntu 14.04 LTS
Hi,
I have a jenkins slave machine running with docker properly installed according to instructions Docker installation. I have no settings configured in /etc/default/docker and DOCKER_HOST and DOCKER_OPTS are unset. docker info on the machine leads to :
$ docker info Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 5 Server Version: 1.10.1 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 11 Dirperm1 Supported: false Execution Driver: native-0.2 Logging Driver: json-file Plugins: Volume: local Network: host bridge null Kernel Version: 3.13.0-77-generic Operating System: Ubuntu 14.04.3 LTS OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 3.676 GiB Name: ip-10-0-30-218 ID: TOIS:D4A3:XIQO:EIOY:DD6F:CLWD:AARK:MSPX:UTLK:O5BN:QCBI:7UZK WARNING: No swap limit support
docker version on the machine leads to:
$ docker version Client: Version: 1.10.1 API version: 1.22 Go version: go1.5.3 Git commit: 9e83765 Built: Thu Feb 11 19:27:08 2016 OS/Arch: linux/amd64 Server: Version: 1.10.1 API version: 1.22 Go version: go1.5.3 Git commit: 9e83765 Built: Thu Feb 11 19:27:08 2016 OS/Arch: linux/amd64
If I run a pipeline job which is configured to checkout a repository on the specific node, load a Jenkinsfile from repo, which essentially builds a docker image from a Dockerfile in the repo described in the Jenkinsfile. All goes well, I have perfectly cross checked I am on the same node, as the checkout is happening in the mounted ebs on the machine. The result is pipeline cannot find the running docker daemon, which is running perfectly on the machine. I can easily build the docker image from the Dockerfile manually.
Are there any docker specific settings that need to be set to access the daemon from pipeline e.g. Any DOCKER_OPTS exposing any unix socket or TCP port?
Running on jenkins-slave-CI in /ebs/jenkins/workspace/test [Pipeline] node { [Pipeline] General Build Wrapper : Start [Pipeline] wrap { [Pipeline] stage: checkout 10:53:16 Entering stage checkout 10:53:16 Proceeding [Pipeline] git Some checkout stuff here [Pipeline] load: Loaded script: Jenkinsfile [Pipeline] load { [Pipeline] stage: build 10:53:17 Entering stage build 10:53:17 Proceeding [Pipeline] sh 10:53:18 [test] Running shell script 10:53:18 + docker build -t test/test-resources:env . 10:53:18 Cannot connect to the Docker daemon. Is the docker daemon running on this host? [Pipeline] echo 10:53:18 Failed: hudson.AbortException: script returned exit code 1 [Pipeline] mail [Pipeline] } //load [Pipeline] } //wrap [Pipeline] General Build Wrapper : End [Pipeline] } //node [Pipeline] Allocate node : End [Pipeline] End of Pipeline Finished: SUCCESS