Admiral-Piett / goaws

AWS (SQS/SNS) Clone for Development testing
MIT License
767 stars 144 forks source link

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

Closed macabu closed 2 months ago

macabu commented 3 months ago

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

References:

Admiral-Piett commented 3 months ago

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

macabu commented 3 months ago

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.

Admiral-Piett commented 2 months ago

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

macabu commented 2 months ago

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