goaws icon indicating copy to clipboard operation
goaws copied to clipboard

chore(release): build multi-arch docker image with same suffix

Open macabu opened this issue 10 months ago • 2 comments

While trying to migrate workloads from amd64 to arm64, having a single tag for both architectures makes the transition easier.

References:

  • https://goreleaser.com/cookbooks/multi-platform-docker-images/#creating-multi-platform-docker-images-with-goreleaser
  • https://carlosbecker.com/posts/multi-platform-docker-images-goreleaser-gh-actions/

macabu avatar Apr 04 '24 13:04 macabu

@macabu I don't understand what we're trying to accomplish here. What tags do you want that you don't currently get?

Admiral-Piett avatar Apr 10 '24 20:04 Admiral-Piett

Hi @Admiral-Piett sorry, I can clarify.

My host is arm64, and currently if I do:

~ docker pull admiralpiett/goaws
~ docker image inspect admiralpiett/goaws
...
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 13373043,
...

The architecture of the image is amd64. In order to pull the arm64 image, I should add a -arm64 suffix to the tag.

The idea with the PR is to provide multi-platform images, so a single tag can contain both amd64 and arm64 architectures, so that if I do:

~ docker pull admiralpiett/goaws

It auto-detects my host architecture (and pulls the arm64 image variant), unless I explicitly specify it with the --platform flag.

macabu avatar Apr 11 '24 07:04 macabu

@macabu interesting - I honestly didn't know you could do that. Let's give it a whirl! Thanks!

Admiral-Piett avatar Apr 24 '24 22:04 Admiral-Piett

Thank you! Pulling the images I am getting the expected result 🎉

macabu avatar Apr 25 '24 07:04 macabu