Changed build container image to buildkit

This commit is contained in:
Marcin-Ramotowski 2025-06-08 10:55:44 +00:00
parent b14e6cf873
commit 43a6e7c67b

12
Jenkinsfile vendored
View File

@ -33,11 +33,15 @@ pipeline {
stage('Build & Push Docker') { stage('Build & Push Docker') {
steps { steps {
container('docker') { container('buildkitd') {
sh ''' sh '''
docker build -t ${DOCKER_IMAGE} . buildctl build \
echo "${ACR_PASSWORD}" | docker login marcin00.azurecr.io -u ${ACR_USERNAME} --password-stdin --frontend dockerfile.v0 \
docker push ${DOCKER_IMAGE} --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
''' '''
} }
} }