Skip to content

Conversation

@lexfrei
Copy link

@lexfrei lexfrei commented Feb 2, 2026

Summary

Enable ARM64 and other architecture support by using Docker's automatic TARGETARCH variable instead of hardcoded GOARCH=amd64.

Problem

The current Dockerfile hardcodes ARG GOARCH=amd64, which prevents building images for other architectures like arm64 using docker buildx build --platform linux/arm64.

Solution

  • Use TARGETARCH which is automatically set by Docker buildx during multi-platform builds
  • Fall back to amd64 for backward compatibility with non-buildx builds

Changes

# Before
ARG GOARCH=amd64

# After
ARG TARGETARCH
ARG GOARCH=${TARGETARCH:-amd64}

Testing

Build for multiple platforms:

docker buildx build --platform linux/amd64,linux/arm64 -t kilo:test .

Replace hardcoded GOARCH=amd64 with TARGETARCH which is automatically
set by Docker buildx during multi-platform builds. This enables
building kilo images for arm64 and other architectures.

The GOARCH variable now defaults to TARGETARCH when set, falling back
to amd64 for backward compatibility with non-buildx builds.

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
@squat
Copy link
Owner

squat commented Feb 2, 2026

Kilo already supports multi-platform manifests, the CI just doesn't use docker buildx as the underlying tooling to accomplish the builds. Check out the available architectures for any tag on Docker Hub: https://hub.docker.com/layers/squat/kilo/latest/images/sha256-0d0987b6cc77f0d24c82fd13d34585c3db3a3a94efb01532945c59f3fae58c19

Or is the concrete goal of this PR to enable using buildx?

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.

2 participants