0

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.

2
  • Is this a public project? If so, please include the project link. Commented Jun 28, 2024 at 10:21
  • 1
    I see that the docker/setup-buildx-action@v3 is mentioned in the code. but it doesn't specify the docker-container driver. Can you add the driver: docker-container parameter to the docker/setup-buildx-action@v3 step. Something like this- - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: driver: docker-container Commented Jul 3, 2024 at 11:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.