Skip to content

Commit

Permalink
chore(release): build multi-arch docker image with same suffix
Browse files Browse the repository at this point in the history
While trying to migrate workloads from amd64 to arm64, having a single tag
for both architectures makes the transition easier.

Reference: https://goreleaser.com/cookbooks/multi-platform-docker-images/#creating-multi-platform-docker-images-with-goreleaser
  • Loading branch information
macabu authored and Admiral-Piett committed Apr 24, 2024
1 parent d4e4598 commit 615ad59
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,34 @@ dockers:
- goos: linux
goarch: amd64
dockerfile: goreleaser.dockerfile
use: buildx
image_templates:
- "admiralpiett/goaws"
- "admiralpiett/goaws:{{ .Tag }}"
- "admiralpiett/goaws:{{ .Tag }}-amd64"
- "admiralpiett/goaws:latest-amd64"
- "admiralpiett/goaws:latest"
extra_files:
- app/conf/goaws.yaml
build_flag_templates:
- "--platform=linux/amd64"
- goos: linux
goarch: arm64
dockerfile: goreleaser.dockerfile
use: buildx
image_templates:
- "admiralpiett/goaws:{{ .Tag }}-arm64"
- "admiralpiett/goaws:latest-arm64"
extra_files:
- app/conf/goaws.yaml
build_flag_templates:
- "--platform=linux/arm64"

docker_manifests:
- name_template: admiralpiett/goaws:{{ .Tag }}
image_templates:
- admiralpiett/goaws:{{ .Tag }}-amd64
- admiralpiett/goaws:{{ .Tag }}-arm64
- name_template: admiralpiett/goaws:latest
image_templates:
- admiralpiett/goaws:{{ .Tag }}-amd64
- admiralpiett/goaws:{{ .Tag }}-arm64

archives:
- id: archive_names
name_template: >-
Expand Down

0 comments on commit 615ad59

Please sign in to comment.