diff --git a/Jenkinsfile b/Jenkinsfile index b308626..7e2e5f6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,12 +33,16 @@ pipeline { stage('Build & Push Docker') { steps { - container('docker') { - sh ''' - docker build -t ${DOCKER_IMAGE} . - echo "${ACR_PASSWORD}" | docker login marcin00.azurecr.io -u ${ACR_USERNAME} --password-stdin - docker push ${DOCKER_IMAGE} - ''' + container('buildkitd') { + sh ''' + buildctl build \ + --frontend dockerfile.v0 \ + --local context=. \ + --local dockerfile=. \ + --output type=image,name=${DOCKER_IMAGE},push=true \ + --export-cache type=registry,ref=${DOCKER_IMAGE}-cache,mode=max \ + --import-cache type=registry,ref=${DOCKER_IMAGE}-cache + ''' } } }