From 561804d525310d3c0849c3cb967792e324a479ad Mon Sep 17 00:00:00 2001 From: Adam Koszek Date: Mon, 24 Nov 2025 22:37:48 -0800 Subject: [PATCH 1/2] Feat: Migrate to docker_manifests with multi-arch support (fixes #144, 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 --- .goreleaser.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 723318d..2a8cef5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -242,11 +242,10 @@ winget: dockers: - image_templates: - - "ghcr.io/bsubio/cli:{{ .Tag }}" - - "ghcr.io/bsubio/cli:v{{ .Major }}" - - "ghcr.io/bsubio/cli:v{{ .Major }}.{{ .Minor }}" - - "ghcr.io/bsubio/cli:latest" + - "ghcr.io/bsubio/cli:{{ .Tag }}-amd64" dockerfile: Dockerfile + use: buildx + goarch: amd64 build_flag_templates: - "--pull" - "--label=org.opencontainers.image.created={{.Date}}" @@ -260,6 +259,45 @@ dockers: extra_files: - LICENSE + - image_templates: + - "ghcr.io/bsubio/cli:{{ .Tag }}-arm64" + dockerfile: Dockerfile + use: buildx + goarch: arm64 + build_flag_templates: + - "--pull" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.title=bsubio" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.source=https://github.com/bsubio/cli" + - "--label=org.opencontainers.image.description=CLI for easy running heavy duty compute jobs in the cloud" + - "--label=org.opencontainers.image.licenses=MIT" + - "--platform=linux/arm64" + extra_files: + - LICENSE + +docker_manifests: + - name_template: "ghcr.io/bsubio/cli:{{ .Tag }}" + image_templates: + - "ghcr.io/bsubio/cli:{{ .Tag }}-amd64" + - "ghcr.io/bsubio/cli:{{ .Tag }}-arm64" + + - name_template: "ghcr.io/bsubio/cli:v{{ .Major }}" + image_templates: + - "ghcr.io/bsubio/cli:{{ .Tag }}-amd64" + - "ghcr.io/bsubio/cli:{{ .Tag }}-arm64" + + - name_template: "ghcr.io/bsubio/cli:v{{ .Major }}.{{ .Minor }}" + image_templates: + - "ghcr.io/bsubio/cli:{{ .Tag }}-amd64" + - "ghcr.io/bsubio/cli:{{ .Tag }}-arm64" + + - name_template: "ghcr.io/bsubio/cli:latest" + image_templates: + - "ghcr.io/bsubio/cli:{{ .Tag }}-amd64" + - "ghcr.io/bsubio/cli:{{ .Tag }}-arm64" + homebrew_casks: - name: bsubio ids: From 92110a2275be581348c90b75b1b32d1bbe612c6c Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 06:43:05 +0000 Subject: [PATCH 2/2] Fix: Add goos and update Docker binary paths for multi-arch builds - 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 --- .goreleaser.yaml | 2 ++ Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2a8cef5..b5e4c2c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -245,6 +245,7 @@ dockers: - "ghcr.io/bsubio/cli:{{ .Tag }}-amd64" dockerfile: Dockerfile use: buildx + goos: linux goarch: amd64 build_flag_templates: - "--pull" @@ -263,6 +264,7 @@ dockers: - "ghcr.io/bsubio/cli:{{ .Tag }}-arm64" dockerfile: Dockerfile use: buildx + goos: linux goarch: arm64 build_flag_templates: - "--pull" diff --git a/Dockerfile b/Dockerfile index c2eead3..76c7f0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Copy the binary from the build -COPY bin/bsubio /usr/local/bin/bsubio +COPY bsubio /usr/local/bin/bsubio # Set bsubio as the entrypoint ENTRYPOINT ["/usr/local/bin/bsubio"]