Skip to content

Pipeline: Build Docker images for multiple architectures #664

@iaktern

Description

@iaktern

In the pipeline, our docker images are currently only build for amd64 (x86_64) CPUs. This is usually not a big problem yet, since ARM CPU architectures like Mac can also use these images via a virtual translation layer. But maybe it will be a problem somewhere else or in the future.

Possible solution from copilot (task: check and test first!):

Use Docker Buildx in Actions — Kaniko itself doesn't create multi‑arch manifests easily. Recommended: replace the single Kaniko step with buildx (setup qemu + buildx + docker/login + docker/build-push-action) which will build and push a multi‑arch image.

Example replacement for your deployEngine job:

- name: Set up QEMU
  uses: docker/setup-qemu-action@v2

- name: Set up Docker buildx
  uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
  uses: docker/login-action@v2
  with:
    username: ${{ secrets.DOCKERHUB_USERNAME }}
    password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push multi-arch image
  uses: docker/build-push-action@v4
  with:
    context: ${{ env.DOCKER_PATH_ENGINE }}
    file: ${{ env.DOCKER_PATH_ENGINE }}/Dockerfile
    platforms: linux/amd64,linux/arm64
    push: true
    tags: |
      docker.io/proceed/engine:${{ env.IMAGE_TAG }}

Notes:

  • buildx will use QEMU for emulation (setup-qemu handles registering binfmt).
  • --push / push: true is required to publish a multi‑arch manifest.
  • Add other platforms (linux/arm/v7, etc.) as needed in platforms.
  • If you must keep Kaniko, you need to build and push separate arch images (on appropriate runners or using emulation), then create a manifest list (docker manifest or buildx imagetools) — more complex and less convenient than buildx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todos: Fine-Grained

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions