Skip to content

Build arm64 images natively instead of emulating them - #46

Merged
kdambekalns merged 3 commits into
mainfrom
task/native-arm64-builds
Nov 5, 2026
Merged

kdambekalns merged 3 commits into
mainfrom
task/native-arm64-builds

Conversation

@kdambekalns

@kdambekalns kdambekalns commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Same approach as flownative/docker-php#70, which brought the docker-php build from ~150 to 10 minutes.

  • prepare determines the latest release tag once
  • build: matrix PHP branch × platform, linux/amd64 on ubuntu-24.04, linux/arm64 on ubuntu-24.04-arm. Each job reads the PHP version from the org.opencontainers.image.version label of harbor.flownative.io/docker/php:<branch> (with docker buildx imagetools inspect instead of flownative/action-docker-get-label) and pushes by digest only.
  • merge combines the two digests of each PHP version into one manifest list and tags it (8.4, 8.4.27) in Docker Hub and Harbor.
  • announce is unchanged, now after merge.

The digest artifacts are named after the PHP version each job found. Should docker-php publish a new version between the two jobs of a branch, the merge finds only one digest per version and fails instead of combining images of different PHP versions.

Also adds workflow_dispatch, to start a build by hand.

Tested: actionlint is clean; the version step was run locally against Harbor, including a mismatching label.

Test run (workflow_dispatch on this branch, https://github.com/flownative/docker-beach-php/actions/runs/41896508784): 5 min instead of ~8. Build jobs 2–3.5 min each, merge 1 min. All tags in Docker Hub and Harbor carry amd64 and arm64, and the version label is correct.

Refs OPS-8R (https://minka.flownative.com/go/card/OPS-8R)

Like in docker-php, every platform now builds on a native runner of its
own (ubuntu-24.04 and ubuntu-24.04-arm) and pushes by digest only; a
merge job combines the digests into one manifest list per PHP version
and tags it in both registries.

Each build job reads the PHP version from the label of the newest
harbor.flownative.io/docker/php image itself and names its digest
artifact after it, so if docker-php publishes a new version between the
two jobs of a branch, the merge fails instead of combining images of
different PHP versions.

Also adds workflow_dispatch, to be able to start a build by hand.

Refs OPS-8R

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kdambekalns kdambekalns left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

@kdambekalns
kdambekalns merged commit 06a77b8 into main Nov 5, 2026
8 checks passed
@kdambekalns
kdambekalns deleted the task/native-arm64-builds branch November 5, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant