Skip to content

ci(docker): publish multi-arch images (linux/amd64 + linux/arm64) - #73

Open
gangtao wants to merge 1 commit into
mainfrom
feat/multi-arch-docker-images
Open

ci(docker): publish multi-arch images (linux/amd64 + linux/arm64)#73
gangtao wants to merge 1 commit into
mainfrom
feat/multi-arch-docker-images

Conversation

@gangtao

@gangtao gangtao commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Closes #72.

What

Both timeplus/tpk-app and timeplus/tpk were pinned to linux/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 — add docker/setup-qemu-action@v3 and build linux/amd64,linux/arm64 for push / tag / workflow_dispatch runs (both app and allinone jobs). Pull-request smoke builds stay linux/amd64 to keep PR CI fast. Tag scheme is unchanged (latest, short SHA, semver); each tag is now a manifest list.
  • MakefilePLATFORMS and DOCKER_BUILD_FLAGS vars so make 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 (no PLATFORMS) is the same docker build as before.
  • README.md, deploy/k8s/README.md — note the images are multi-arch.

No Dockerfile changes were needed.

Verification

  • All base images publish arm64 manifests (docker manifest inspect): node:22-alpine, debian:12-slim, ghcr.io/astral-sh/uv, ghcr.io/timeplus-io/proton:latest.
  • uv.lock audit: every registry package with native (manylinux/musllinux) wheels also has an aarch64 wheel; no sdist-only packages. So the pybuild stage needs no extra build deps on arm64.
  • Built the app target natively for linux/arm64 on an M-series Mac (docker buildx build --platform linux/arm64 --target app): builds clean, docker image inspect reports linux/arm64, and docker run … --help prints the tpk CLI.
  • make -n docker-build-app (unchanged: docker build …) and make -n docker-build-app PLATFORMS=linux/amd64,linux/arm64 DOCKER_BUILD_FLAGS=--push (→ docker buildx build --platform … --push …) produce the expected commands.
  • Workflow YAML parses; the ${{ env.PLATFORMS }} expression resolves per event type.

Not verified here

  • The amd64 leg under this exact workflow (already exercised by the current CI; unchanged).
  • The allinone target on arm64 end-to-end — its only arm64-specific input is the proton base image, which is published for arm64. Worth watching the first main run's build time: the arm64 leg is QEMU-emulated. If it's too slow, the follow-up is native ubuntu-24.04-arm runners plus a manifest-merge step.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YWBAAVmvtAmwsXjWGN9JdL

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
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.

Publish multi-platform Docker images (linux/amd64 + linux/arm64)

1 participant