I have been manually publishing my docker image to my azure container registry by using the following command:
docker buildx build --platform linux/amd64,linux/arm64/v8 -t project.azurecr.io/project:{VERSION_NUMBER} . --push
I am attempting to automate this process using the following Github Workflow per the Docker Documentation on a workflow for multi-arch publishing:
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: project.azurecr.io
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Read version number
id: get_version
run: echo "VERSION_NUMBER=$(cat VERSION)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: project.azurecr.io/project:${{ env.VERSION_NUMBER }}
But my Build and Push fails with the following error: ERROR: Multi-platform build is not supported for the docker driver. Switch to a different driver, or turn on the containerd image store, and try again.
Please let me know if I am missing anything...
I tried to specify the docker-container driver, I tried to run the docker commands as is, I tried to use different buildkits. I use the moby buildkit on my local.
- name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: driver: docker-container