Browse Source

Update Jenkinsfile to use buildx container driver

perillamint 6 months ago
parent
commit
f252b76599
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Jenkinsfile

+ 2 - 1
Jenkinsfile

@@ -71,7 +71,8 @@ pipeline {
                         stages {
                             stage('Build platform specific image') {
                                 steps {
-                                    sh "docker build -t $DOCKER_IMAGE:$DOCKER_TAG-${TARGET} --platform linux/${TARGET} ."
+                                    sh "docker buildx create --name container-${TARGET} --driver=docker-container"
+                                    sh "docker buildx build --builder container-${TARGET} -t $DOCKER_IMAGE:$DOCKER_TAG-${TARGET} --platform linux/${TARGET} ."
                                 }
                             }
                             stage('Push platform specific image') {