Skip to content

fix: support multi-arch container image builds (arm64, amd64)#6

Open
AruneshDwivedi wants to merge 1 commit into
ContainerSSH:mainfrom
AruneshDwivedi:fix/multi-arch-container-image
Open

fix: support multi-arch container image builds (arm64, amd64)#6
AruneshDwivedi wants to merge 1 commit into
ContainerSSH:mainfrom
AruneshDwivedi:fix/multi-arch-container-image

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

Problem

The official containerssh/containerssh Docker image is published as linux/amd64 only. The Dockerfile hardcodes the _linux_amd64.tar.gz download URL, so arm64 users cannot use the official image.

Fix

Replace the single-arch download with a multi-stage build:

  • download-amd64 stage fetches the amd64 binary
  • download-arm64 stage fetches the arm64 binary
  • merge stage combines both
  • Final stage uses $TARGETARCH to copy only the matching binary

This enables docker buildx multi-platform builds producing both linux/amd64 and linux/arm64 images.

Fixes ContainerSSH/ContainerSSH#696

Replace single-arch amd64-only download with multi-stage build that
downloads both amd64 and arm64 binaries, then uses TARGETARCH to copy
the correct one into the final image.

Fixes ContainerSSH/ContainerSSH#696

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@AruneshDwivedi AruneshDwivedi force-pushed the fix/multi-arch-container-image branch from c9c3848 to 16d2629 Compare June 9, 2026 10:35
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.

Official ContainerSSH image lacks linux/arm64 support

1 participant