diff --git a/Jenkinsfile b/Jenkinsfile index 33b7bae..7d15b6a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ def resolveImageName(env) { pipeline { agent { docker { - image 'alpinelinux/docker-cli' + image 'alpine:3.17.3' // Mount docker socket for docker-in-docker args '-v /var/run/docker.sock:/var/run/docker.sock' } @@ -21,6 +21,12 @@ pipeline { apk update && \ apk add --no-cache git """ + + sh """curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-17.04.0-ce.tgz \ + && tar xzvf docker-17.04.0-ce.tgz \ + && mv docker/docker /usr/local/bin \ + && rm -r docker docker-17.04.0-ce.tgz""" + script { env.IMAGE_BASE_NAME = "jdk14-alpine" env.RELEASE_TAG_PREFIX = "release-" @@ -33,8 +39,7 @@ pipeline { } stage('build_docker') { steps { - sh "which docker" - sh "/usr/bin/docker build . --tag ${resolveImageName(env)}" + sh "docker build . --tag ${resolveImageName(env)}" } } stage('push_docker') {