Publish multi-arch Docker image via buildx#70
Open
rick-lam wants to merge 1 commit into
Open
Conversation
Adds a GH Actions workflow that builds linux/amd64 + linux/arm64 manifests on tag push and pushes to graze/morphism on Docker Hub, fixing "no matching manifest for linux/arm64/v8" pulls on Apple Silicon. Switches the Makefile to buildx (host-arch by default, with a build-docker-multiarch target for local cross builds) and removes the legacy Docker Hub Automated Builds hooks/build script. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds automated multi-architecture (linux/amd64 + linux/arm64) Docker image publishing for graze/morphism on semver tag pushes, replacing the legacy Docker Hub Automated Builds hook, and provides matching buildx-based local Makefile targets so contributors can reproduce host-arch and multi-arch builds locally.
Changes:
- New
.github/workflows/docker.ymlthat usesdocker/{setup-qemu,setup-buildx,login,metadata,build-push}-actionto build and push multi-arch images, tagged viatype=semverpluslatest. - New
build-dockerandbuild-docker-multiarchMakefile targets (withPLATFORMSand opt-inPUSH=1) that mirror the workflow's build args. - Deletes the obsolete
hooks/buildDocker Hub Automated Builds script.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/docker.yml |
New tag-triggered workflow that builds and pushes the multi-arch image to Docker Hub. |
Makefile |
Adds buildx-based host-arch and multi-arch build targets and registers them as .PHONY. |
hooks/build |
Removes the legacy Docker Hub Automated Builds hook now superseded by the workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| build-args: | | ||
| BUILD_DATE=${{ github.event.repository.updated_at }} |
| tags: | | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=raw,value=latest |
| on: | ||
| push: | ||
| tags: | ||
| - 'v[0-9]+.[0-9]+' |
4 tasks
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.
Summary
.github/workflows/docker.ymlto buildlinux/amd64+linux/arm64and pushgraze/morphismto Docker Hub onv*tag pushes (fixesno matching manifest for linux/arm64/v8on Apple Silicon).Makefiletodocker buildx:build-docker(host-arch,--load) andbuild-docker-multiarch(PLATFORMS,PUSH=1opt-in).hooks/build.Mirrors the pattern landed in graze/sprout#21. Docker tags are emitted via
type=semverso thev6.0.5git tag becomes6.0.5/6.0/lateston Docker Hub.Notes
DOCKERHUB_USERNAME/DOCKERHUB_TOKENrepo secrets.Dockerfileruntime base isgraze/php-alpine:7.4— confirm anarm64manifest exists before cutting a tag, otherwise the cross build will fail.Test plan
make build-dockerbuilds locally on host arch.make build-docker-multiarch(withoutPUSH=1) cross-builds locally.graze/php-alpine:7.4ships anarm64manifest (docker buildx imagetools inspect graze/php-alpine:7.4).🤖 Generated with Claude Code