How to have a 17.05+ docker running in my Jenkins executors ?
I've followed the tutorials:
- https://cloud.google.com/solutions/jenkins-on-container-engine
- https://cloud.google.com/solutions/jenkins-on-container-engine-tutorial
- https://cloud.google.com/solutions/continuous-delivery-jenkins-kubernetes-engine
- https://cloud.google.com/solutions/configuring-jenkins-kubernetes-engine
Everything works as described in the tutorials.
I've got a (working) multi-stage Dockerfile that I am trying to build in Jenkins, but it requires a recent Docker version (> 17.05).
I can't find a way to update this ...
In my pipeline, if I run docker version, I always get 1.13.1 no matter what I do:
docker version
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.8.1
Git commit: 092cba3
Built: Wed Aug 30 20:31:05 2017
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Go version: go1.8.1
Git commit: 092cba3
Built: Wed Aug 30 20:31:05 2017
OS/Arch: linux/amd64
Experimental: false
In the container I'm supposed to use as a slave, with docker run -it 'image-name' bash:
docker version
Client:
Version: 17.11.0-ce
API version: 1.34
Go version: go1.8.3
Git commit: 1caf76c
Built: Mon Nov 20 18:36:37 2017
OS/Arch: linux/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
On Jenkins > Configure Jenkins I've set 0 executors, only 1 container template using my freshly pushed image (I've checked it, it is up-to-date), the "Always pull image" checkbox checked ...
When I set Labels to my Kubernetes Pod Template (e.g. docker-edge) and try to restrict the executors with labels:
node('docker-edge')in my Jenkinsfile doesn't change anything- In my job configuration, setting
Pipeline Model Definition>Docker Labeltodocker-edge` makes it stall and not find any executor