Docker image for ARM as well #40

Merged
squid merged 1 commit from feat/arm64-image into main 2026-11-16 13:33:57 +00:00
Owner

I'm publishing the image for arm64 next to amd64, so a Raspberry Pi or an ARM NAS can pull it. Closes #39.

Each tag (X.Y.Z, X.Y, latest) points at both images. The runner has no Docker and cannot run ARM, so the Go program is cross-compiled, the last stage of the Dockerfile runs no command, and the arm64 image starts from the arm64 Alpine by digest.

Checked: the two-architecture jobs ran on the runner with a fake version (both images pushed, one tag pointing at the two, each with the right architecture, user, port, volume and health check, and an ARM program inside), then the test tags were deleted. Both architectures build here with buildx, and the amd64 image runs and is healthy.

I'm publishing the image for arm64 next to amd64, so a Raspberry Pi or an ARM NAS can pull it. Closes #39. Each tag (X.Y.Z, X.Y, latest) points at both images. The runner has no Docker and cannot run ARM, so the Go program is cross-compiled, the last stage of the Dockerfile runs no command, and the arm64 image starts from the arm64 Alpine by digest. Checked: the two-architecture jobs ran on the runner with a fake version (both images pushed, one tag pointing at the two, each with the right architecture, user, port, volume and health check, and an ARM program inside), then the test tags were deleted. Both architectures build here with buildx, and the amd64 image runs and is healthy.
The image is now made for amd64 and for arm64, and each tag (X.Y.Z, X.Y,
latest) points at both, so a Raspberry Pi or an ARM NAS pulls the right one.

- Dockerfile: the web and Go stages run on the builder and the Go program is
  cross-compiled (GOARCH from SONDA_ARCH or TARGETARCH); what the image needs
  besides the program (time zones, the user, the folders) is made in a stage
  of the builder, so the last stage runs no command and needs no emulation.
- release workflow: the runner has no Docker and cannot run ARM, and kaniko
  takes the base of every stage for one platform, so the arm64 image starts
  from the arm64 Alpine by digest (found at each release), kaniko builds one
  image per architecture, and crane sets the architecture of each and joins
  them under the tags.
squid merged commit 2e194da4e3 into main 2026-11-16 13:33:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
squid/sonda!40
No description provided.