ci(docker): publish multi-arch images (linux/amd64 + linux/arm64) - #73
Open
gangtao wants to merge 1 commit into
Open
ci(docker): publish multi-arch images (linux/amd64 + linux/arm64)#73gangtao wants to merge 1 commit into
gangtao wants to merge 1 commit into
Conversation
Both timeplus/tpk-app and timeplus/tpk were built for linux/amd64 only, so the README one-command quick start failed or ran under emulation on Apple Silicon and on ARM (Graviton) k8s nodes. - docker-publish.yml: add docker/setup-qemu-action and build linux/amd64,linux/arm64 for push/tag/dispatch runs. PR smoke builds stay linux/amd64 to keep CI fast. Tags are unchanged; each is now a manifest list. - Makefile: PLATFORMS / DOCKER_BUILD_FLAGS vars so `make docker-build*` can do cross / multi-arch builds via buildx. - README + deploy/k8s/README: note the images are multi-arch. No Dockerfile changes: node:22-alpine, debian:12-slim, astral-sh/uv and ghcr.io/timeplus-io/proton all publish arm64, and every package in uv.lock with native wheels has an aarch64 wheel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YWBAAVmvtAmwsXjWGN9JdL
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.
Closes #72.
What
Both
timeplus/tpk-appandtimeplus/tpkwere pinned tolinux/amd64, so the README one-command quick start failed (no matching manifest) or ran under QEMU emulation on Apple Silicon and ARM (Graviton) Kubernetes nodes..github/workflows/docker-publish.yml— adddocker/setup-qemu-action@v3and buildlinux/amd64,linux/arm64for push / tag /workflow_dispatchruns (bothappandallinonejobs). Pull-request smoke builds staylinux/amd64to keep PR CI fast. Tag scheme is unchanged (latest, short SHA, semver); each tag is now a manifest list.Makefile—PLATFORMSandDOCKER_BUILD_FLAGSvars somake docker-build{,-app,-allinone}can do cross / multi-arch builds via buildx, e.g.make docker-build PLATFORMS=linux/amd64,linux/arm64 DOCKER_BUILD_FLAGS=--push. Default (noPLATFORMS) is the samedocker buildas before.README.md,deploy/k8s/README.md— note the images are multi-arch.No Dockerfile changes were needed.
Verification
docker manifest inspect):node:22-alpine,debian:12-slim,ghcr.io/astral-sh/uv,ghcr.io/timeplus-io/proton:latest.uv.lockaudit: every registry package with native (manylinux/musllinux) wheels also has anaarch64wheel; no sdist-only packages. So thepybuildstage needs no extra build deps on arm64.apptarget natively forlinux/arm64on an M-series Mac (docker buildx build --platform linux/arm64 --target app): builds clean,docker image inspectreportslinux/arm64, anddocker run … --helpprints the tpk CLI.make -n docker-build-app(unchanged:docker build …) andmake -n docker-build-app PLATFORMS=linux/amd64,linux/arm64 DOCKER_BUILD_FLAGS=--push(→docker buildx build --platform … --push …) produce the expected commands.${{ env.PLATFORMS }}expression resolves per event type.Not verified here
allinonetarget on arm64 end-to-end — its only arm64-specific input is the proton base image, which is published for arm64. Worth watching the firstmainrun's build time: the arm64 leg is QEMU-emulated. If it's too slow, the follow-up is nativeubuntu-24.04-armrunners plus a manifest-merge step.🤖 Generated with Claude Code
https://claude.ai/code/session_01YWBAAVmvtAmwsXjWGN9JdL