fix: fixed agent docker installation
Gitea/docker-base-images/jdk14-alpine/pipeline/head There was a failure building this commit Details

amorozov 2023-04-04 19:56:17 +03:00
parent 9aaaca58d1
commit e559426d2e
1 changed files with 3 additions and 6 deletions

9
Jenkinsfile vendored
View File

@ -11,19 +11,16 @@ pipeline {
docker { docker {
image 'alpine:3.17.3' image 'alpine:3.17.3'
// Mount docker socket for docker-in-docker // Mount docker socket for docker-in-docker
args '-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/local/bin/docker' args '-v /var/run/docker.sock:/var/run/docker.sock'
} }
} }
stages { stages {
stage('prepare') { stage('prepare') {
steps { steps {
sh 'echo ${PATH}'
sh 'ls -la /usr/local/bin | grep docker'
sh "which docker"
sh 'chmod +x /usr/local/bin/docker'
sh """ sh """
apk update && \ apk update && \
apk add --no-cache git apk add --no-cache git && \
apk add docker-cli
""" """
script { script {
env.IMAGE_BASE_NAME = "jdk14-alpine" env.IMAGE_BASE_NAME = "jdk14-alpine"