Repository navigation
ci(docker): build and publish the ui image for amd64 and arm64 - #431
Merged
Merged
Conversation
The published ui image is linux/amd64 only, so on Apple Silicon and other arm64 hosts it runs under emulation. Add a workflow that builds it with buildx/QEMU for linux/amd64 and linux/arm64, publishes it on v* tags (or a manual run for an existing tag) and only builds it on pull requests that touch the image. The builder stage runs on the build platform, since its output is static files. Refs Visual-Regression-Tracker/Visual-Regression-Tracker#351 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
- workflow_dispatch checks out refs/tags/<tag>, so a branch with the same name can't be published under a release version - persist-credentials: false keeps GITHUB_TOKEN out of .git/config, which is part of the build context - permissions: contents: read; pushes use the Docker Hub secrets Addresses CodeRabbit review on backend#412. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
visualregressiontracker/uiis published forlinux/amd64only (every tag on Docker Hub, including5.6.0from today, has a single amd64 manifest), so on Apple Silicon and other arm64 hosts docker compose runs it under emulation (#351).Root cause
No workflow builds or publishes the image. It is built by hand for amd64 only.
Fix
.github/workflows/docker.yml: buildx + QEMU,platforms: linux/amd64,linux/arm64vX.Y.Ztag (the existing release tag scheme) publishesvisualregressiontracker/ui:X.Y.Zworkflow_dispatchwith an existing tag republishes it. Run it withv5.6.0to add arm64 to the current releaseDockerfile,env.sh,nginx/or the workflow only build both platforms, without pushing (this PR triggers that build)Dockerfile: the builder stage runs on$BUILDPLATFORM. Its output is static files, sonpm ciandvite buildrun once natively instead of again under QEMU for arm64. Only the nginx stage is per platform.Maintainer action needed: add the
DOCKERHUB_USERNAMEandDOCKERHUB_TOKENrepository secrets (a Docker Hub access token with write access to thevisualregressiontrackerorg). Until then only the PR build runs.Verification (arm64 macOS, Docker Desktop)
docker build --platform linux/amd64and--platform linux/arm64with the new Dockerfile: both build, and the image architectures areamd64andarm64x86_64andaarch64, serve the app and generateenv-config.jsfrom the environmentdocker-compose.ymltogether with native arm64 api/migration images (UI 200, API healthy)Unit tests, lint and build were not run: no application code changed.
Fixes Visual-Regression-Tracker/Visual-Regression-Tracker#351 (together with Visual-Regression-Tracker/backend#412 for the api and migration images)
🤖 Generated with Claude Code