Test docker buildx config

This commit is contained in:
Adrien Ferrand 2021-10-10 17:08:50 +02:00
parent 635d3a26bd
commit 9e826a5039

View File

@ -1,12 +1,15 @@
jobs: jobs:
- job: build - job: build
pool: pool:
vmImage: ubuntu-18.04 vmImage: ubuntu-20.04
steps: steps:
- script: | - script: |
docker pull adferrand/backuppc || true set -e
docker build --pull --cache-from adferrand/backuppc -t adferrand/backuppc . docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker save adferrand/backuppc | gzip -c -1 > $(Build.ArtifactStagingDirectory)/docker-backuppc.tar.gz docker buildx create --use
VERSION=`cat VERSION`
echo "Docker tag is: ${VERSION}"
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --tag adferrand/backuppc --output type=local,dest=test .
displayName: Build container displayName: Build container
- task: PublishPipelineArtifact@1 - task: PublishPipelineArtifact@1
inputs: inputs: