Skip to content

Conversation

@mlajkim
Copy link
Contributor

@mlajkim mlajkim commented Jan 6, 2026

Issue

#66

What's done?

This PR implements a Parallel Native Build Strategy to support multi-architecture Docker images (linux/amd64 andlinux/arm64). It utilizes concurrent jobs to improve build performance, as illustrated in the diagram below:

image

How to test the changes

Tip

You can check your machine's CPU architecture with the following command: uname -m

Note

Please note that a temporary image tag -pr64 has been deployed solely for testing purposes. This will not occur in future PRs as the test configuration has been removed

Try to pull image from your Mac with M Chips without multi architecture

docker pull athenz/authorization-proxy:v4.19.0

# v4.19.0: Pulling from athenz/authorization-proxy
# no matching manifest for linux/arm64/v8 in the manifest list entries

Then do the following:

docker pull athenz/authorization-proxy:pr-64

# pr-64: Pulling from athenz/authorization-proxy
# 1edeb25705a0: Pull complete 
# d009860f34ec: Pull complete 
# 32e7ae476e25: Pull complete 
# d4202db2da84: Pull complete 
# 4f4fb700ef54: Pull complete 
# Digest: sha256:47938d311c92f742b7787b55690946d9aa20552e339f9c060e97d3aa78899070
# Status: Downloaded newer image for athenz/authorization-proxy:pr-64
# docker.io/athenz/authorization-proxy:pr-64

Other strategies considered

Click to view details

Use flag --platform

I initially considered using the --platform=linux/amd64,linux/arm64 flag but this approach took significantly longer (approx. 13 minutes) due to the overhead of emulation when building for non-native architectures, as shown below:

image

Use single registry for both temporary image and official image

[!NOTE]
Also, we don't want to run delete API against official registry, which may accidentally delete other correct tag versions

We considered pushing intermediate images with -arm64 or -amd64 suffixes to the main registry as following, but to keep the main registry clean, we decided to use ghcr.io as a temporary staging registry instead:

image

Other minor changes

  • Fixed DOCKER_REGISTRY_URL and DOCKER_REGISTRY_IMAGE as static values, as dynamic assignment is unnecessary
  • Added TODO comments regarding potential issues in the Dockerfile.

Things to note

  • Semantic version tagging has not been fully tested yet. I will verify this after the PR is merged and submit a follow-up fix if any issues arise

Reference

Registry:

@mlajkim mlajkim self-assigned this Jan 6, 2026
@mlajkim mlajkim added the enhancement New feature or request label Jan 6, 2026
@mlajkim mlajkim requested a review from Copilot January 7, 2026 00:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables multi-platform Docker image builds to support both linux/amd64 and linux/arm64 architectures, addressing the issue where Mac users with M-series chips cannot pull the image due to missing ARM64 manifests.

Key Changes:

  • Removed CPU-specific optimization flags (-march=native) from the Dockerfile build process to enable cross-platform compilation
  • Updated GitHub Actions workflow to build and push images for both AMD64 and ARM64 platforms
  • Modified tagging strategy to push latest tag for official version releases

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
Dockerfile Removed -march=native optimization flags and CGO_ENABLED=1 to support cross-platform builds; added commented-out build configuration
.github/workflows/docker-build-publish.yaml Updated platform targets to include ARM64, modified tagging logic for latest, and changed push/load behavior to always push images

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mlajkim mlajkim requested a review from Copilot January 7, 2026 07:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mlajkim mlajkim requested a review from Copilot January 7, 2026 07:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mlajkim mlajkim requested a review from Copilot January 7, 2026 20:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

mlajkim and others added 6 commits January 8, 2026 08:42
Signed-off-by: Aaron Jeongwoo Kim <53258958+mlajkim@users.noreply.github.com>
… intermediate step before creating multi-arch manifests.
Signed-off-by: Jeongwoo Kim - jekim <jekim@lycorp.co.jp>
@mlajkim mlajkim linked an issue Jan 8, 2026 that may be closed by this pull request
Signed-off-by: Jeongwoo Kim - jekim <jekim@lycorp.co.jp>
Signed-off-by: Jeongwoo Kim - jekim <jekim@lycorp.co.jp>
Signed-off-by: Jeongwoo Kim - jekim <jekim@lycorp.co.jp>
Signed-off-by: Jeongwoo Kim - jekim <jekim@lycorp.co.jp>
@mlajkim mlajkim merged commit 7058404 into master Jan 8, 2026
6 checks passed
@mlajkim mlajkim deleted the feat/add-arm64-supported branch January 8, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: support both amd64 and arm64 for Docker images

3 participants