Skip to content

Feat: Migrate to docker_manifests with multi-arch support (fixes #144, fixes #147) - #148

Merged
wkoszek merged 2 commits into
mainfrom
issue/144
Nov 25, 2025
Merged

Feat: Migrate to docker_manifests with multi-arch support (fixes #144, fixes #147)#148
wkoszek merged 2 commits into
mainfrom
issue/144

Conversation

@wkoszek

@wkoszek wkoszek commented Nov 25, 2025

Copy link
Copy Markdown
Contributor

Summary

Migrate from deprecated dockers syntax to docker_manifests and add ARM64 support for multi-architecture Docker images.

Changes

  • Split Docker builds into separate amd64 and arm64 images
  • Use buildx for multi-platform builds
  • Create docker_manifests for all tags (latest, version, major, major.minor)
  • Each manifest includes both amd64 and arm64 images
  • Docker automatically pulls correct architecture based on platform

Images Built

Individual architecture images:

  • ghcr.io/bsubio/cli:v0.14.1-amd64
  • ghcr.io/bsubio/cli:v0.14.1-arm64

Multi-arch manifests:

  • ghcr.io/bsubio/cli:v0.14.1
  • ghcr.io/bsubio/cli:v0
  • ghcr.io/bsubio/cli:v0.14
  • ghcr.io/bsubio/cli:latest

Usage

# Docker automatically pulls the right architecture
docker pull ghcr.io/bsubio/cli:latest

# Works on both amd64 and arm64
docker run ghcr.io/bsubio/cli:latest version

Platform Support

Now works on:

  • ✅ x86_64 Linux servers
  • ✅ Apple Silicon (M1/M2/M3) Macs
  • ✅ AWS Graviton instances
  • ✅ Raspberry Pi (64-bit)
  • ✅ ARM-based cloud instances

Benefits

  • Fixes GoReleaser deprecation warning
  • Adds native ARM64 support
  • Automatic platform detection
  • Future-proof configuration
  • Better performance on ARM (no emulation)

Fixes #144
Fixes #147

…fixes #147)

Migrate from deprecated dockers syntax to docker_manifests and add
ARM64 support for multi-architecture Docker images.

Changes:
- Split Docker builds into separate amd64 and arm64 images
- Use buildx for multi-platform builds
- Create docker_manifests for all tags (latest, version, major, major.minor)
- Each manifest includes both amd64 and arm64 images
- Docker automatically pulls correct architecture

Images built:
- ghcr.io/bsubio/cli:v0.14.1-amd64
- ghcr.io/bsubio/cli:v0.14.1-arm64

Manifests created (multi-arch):
- ghcr.io/bsubio/cli:v0.14.1
- ghcr.io/bsubio/cli:v0
- ghcr.io/bsubio/cli:v0.14
- ghcr.io/bsubio/cli:latest

Benefits:
- Fixes GoReleaser deprecation warning
- Adds ARM64 support (Apple Silicon, AWS Graviton, Raspberry Pi)
- Automatic platform detection
- Future-proof configuration
@claude

claude Bot commented Nov 25, 2025

Copy link
Copy Markdown

Review

Architecture: Migration from deprecated dockers to docker_manifests is correct. Multi-arch support properly configured.

Issue: Dockerfile copies from bin/bsubio (line 9) but doesn't specify architecture. With separate amd64/arm64 builds, GoReleaser needs to know which binary to copy.

Fix needed (.goreleaser.yaml:258, :276):
Add goos: linux to both docker configs. Without it, build may copy wrong binary or fail.

Should be:

goarch: amd64
goos: linux

Why: GoReleaser builds binaries like bin/bsubio_linux_amd64/bsubio. Without explicit goos, path may not match Dockerfile's COPY command.

PR title: Correct format per Conventional Commits.

@wkoszek

wkoszek commented Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

@claude apply:

goarch: amd64
goos: linux

and use appropriate binary from the goreleaser build so that bin/bsubio_linux_amd64/bsubio goes to amd64 image, and other binaries go to other respective images/architectures.

@claude

claude Bot commented Nov 25, 2025

Copy link
Copy Markdown

Claude finished @wkoszek's task —— View job


Changes Applied

  • Read .goreleaser.yaml to understand current structure
  • Read Dockerfile to understand binary paths
  • Add goos: linux to docker configurations
  • Update Dockerfile to use GoReleaser's binary path
  • Commit and push changes

Summary

Added goos: linux to both amd64 and arm64 docker configurations in .goreleaser.yaml (lines 248 and 267). This ensures GoReleaser knows to use Linux-specific binaries for Docker builds.

Updated Dockerfile to use COPY bsubio instead of COPY bin/bsubio. GoReleaser automatically provides the correct architecture-specific binary (bsubio_linux_amd64/bsubio or bsubio_linux_arm64/bsubio) based on the goos and goarch settings.

Note: make check requires approval and wasn't run, but changes are minimal and follow GoReleaser conventions.

--- |

- Add goos: linux to both amd64 and arm64 docker configs
- Update Dockerfile to use GoReleaser's binary path convention
- Ensures correct architecture-specific binaries are copied to images

Co-authored-by: Adam Koszek <wkoszek@users.noreply.github.com>
@claude

claude Bot commented Nov 25, 2025

Copy link
Copy Markdown

Review

Dockerfile path change (.goreleaser.yaml:262, Dockerfile:9)
Binary path changed from bin/bsubio to bsubio. GoReleaser places built binaries at root by default when using use: buildx, but verify this works in CI. If Docker build fails with "file not found", binary location needs explicit configuration in builds section.

Missing platform flag (amd64 section)
Line 259 has --platform=linux/amd64 but missing from original config. Good addition for consistency with ARM64 build. Explicit platform declaration prevents buildx ambiguity.

Config correctness
Migration properly implements docker_manifests pattern. All four manifests (tag, major, major.minor, latest) correctly reference both arch-specific images. Addresses deprecation warning and adds ARM64 support in single change.

Ship it.

@wkoszek
wkoszek merged commit 491f878 into main Nov 25, 2025
2 checks passed
@wkoszek
wkoszek deleted the issue/144 branch November 25, 2025 06:50
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.

Add ARM64 Docker images and multi-arch manifest Migrate from dockers to docker_manifests (dockers_v2)

1 participant