Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use multi-arch building to have arm64 and amd64 images on docker hub #1009

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

baschny
Copy link
Contributor

@baschny baschny commented Nov 22, 2024

In order to build a multi arch image (arm64 and amd64) on release on docker hub:

  • use the buildx action to load the multi-arch capable builder for docker
  • use the build-push-action to build and push the multi-arch images (its not possible to do "build" and "push" in separate steps anymore, since the multi-arch build with buildx only supports --push and not --load).

Tested on my own account: https://hub.docker.com/r/baschny/php-extension-installer/tags

Resolves #1005

@baschny baschny mentioned this pull request Nov 22, 2024
@mlocati
Copy link
Owner

mlocati commented Nov 22, 2024

Why just linux/amd64 and linux/arm64?

I'd use all the platforms defined by the official PHP images...

For example, for the latest php:8.3 image I see these architectures at https://hub.docker.com/_/php/tags:

  • linux/386
  • linux/amd64
  • linux/arm/v5
  • linux/arm/v7
  • linux/arm64/v8
  • linux/mips64le
  • linux/ppc64le
  • linux/s390x

(It seems a bit strange to me that an image cannot be defined as "platform independent", but I guess we have to accept it)

@baschny
Copy link
Contributor Author

baschny commented Nov 22, 2024

Good idea - its so small anyway :) It works: https://hub.docker.com/r/baschny/php-extension-installer/tags, see a750748

@mlocati
Copy link
Owner

mlocati commented Nov 22, 2024

Thanks!

@mlocati mlocati merged commit 5505242 into mlocati:master Nov 22, 2024
40 checks passed
@mlocati
Copy link
Owner

mlocati commented Nov 22, 2024

PS: this required a minor fix - see 2654a69

@mlocati
Copy link
Owner

mlocati commented Nov 25, 2024

And there was a major issue: see #1016 (fixed by 2e59715)

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.

Multi arch images
2 participants