Updating Docker
khwerhahn opened this issue · 4 comments
Hi,
I was trying to use a multi stage Dockerfile and the docker version used by jenkins doesn't seem to be able to do these. I have already updated jenkins to see if this might fix the issue, but it is still there.
Is there a convenient way to update the docker version from jenkins? If not how would I approach this problem? stackoverflow issue
I ran into this issue and the reason it was happening was because of the Docker Pipeline Plugin
https://wiki.jenkins.io/display/JENKINS/Docker+Pipeline+Plugin
Version 1.13 fixes this issue so check if you need to update that plugin in your Jenkins Instance
I saw the docker version while executing this Jenkinsfile:
node {
stage("info") {
sh('docker version ')
}
}
the output is:
+ docker version
Client:
Version: 17.03.2-ce
API version: 1.27
Go version: go1.9.2
Git commit: f5ec1e2
Built: Thu May 10 17:55:58 2018
OS/Arch: linux/amd64
Server:
Version: 17.03.2-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.9.2
Git commit: f5ec1e2
Built: Thu May 10 17:55:58 2018
OS/Arch: linux/amd64
Experimental: false
the version 17.03 is below the version mentioned in the official docs at the first line (17.05): https://docs.docker.com/develop/develop-images/multistage-build/
So I would like to update that docker engine somehow.
Also @gregdaybreak is right. In the changelog of Docker+Pipeline+Plugin 1.13 it sais that this issue is fixed.
I have the 1.17
of the Docker+Pipeline+Plugin and the latest version of this repo and I also would like to have multi-stage builds. Somebody has an idea how to update docker inside this jenkins-k8s-slave
image ?
maybe updating the jnlp-slave image to the :latest
helps:
The latest update #96 allows the agent image to be configured in the pipeline and uses the default image out of the box:
https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes/blob/master/sample-app/Jenkinsfile