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

Multi arch images #1005

Closed
AlexisColes opened this issue Nov 18, 2024 · 6 comments · Fixed by #1009
Closed

Multi arch images #1005

AlexisColes opened this issue Nov 18, 2024 · 6 comments · Fixed by #1009
Labels
enhancement New feature or request

Comments

@AlexisColes
Copy link

Although it seems to work fine using this image on arm64, we do get a warning in our pipelines which would be nice to cleanup.

image

Could you publish this image behind a manifest that support different arches please.

@AlexisColes AlexisColes added the enhancement New feature or request label Nov 18, 2024
@mlocati
Copy link
Owner

mlocati commented Nov 18, 2024

Could you publish this image behind a manifest that support different arches please.

Pull requests are welcome

@baschny
Copy link
Contributor

baschny commented Nov 22, 2024

@mlocati how do you upload the docker images to docker hub? This workflow doesn't seem to be part of this repo.

In case you are using the "Automatic Build" functionality of "Docker Hub" (i.e. have the hooks installed here on Github to build them on Docker Hub on releases) there is (AFAIK) no way of having it create multi-arch images.

If you are doing it manually from your local machine, you can use buildx to create a multiarch push of "latest":

docker buildx create --name multiarch --use --bootstrap
docker buildx build --push \
	--platform linux/amd64,linux/arm64 \
	--tag mlocati/php-extension-installer:latest .
docker buildx rm multiarch

Since you are using Github Actions already for testing the image, it would be "easy" to add a github action which pushes to Docker Hub on release (instead of having Docker Hub pulling and "automatic building"). There are ready made actions to help with this setup (docker/setup-buildx-action@v3, docker/login-action@v3, docker/build-push-action@v6 etc).

If you want to go this route, i could provide you with an pull request with such an github action.

@baschny
Copy link
Contributor

baschny commented Nov 22, 2024

This "warning" appears seems to be new in later docker versions (appears on console when building on ARM - Apple Silicon), and also on Github Actions - that's why its probably popping up only now.

@mlocati
Copy link
Owner

mlocati commented Nov 22, 2024

how do you upload the docker images to docker hub? This workflow doesn't seem to be part of this repo.

See
https://github.com/mlocati/docker-php-extension-installer/blob/2.6.4/.github/workflows/readme-release.yml#L173-L181

@baschny
Copy link
Contributor

baschny commented Nov 22, 2024

Cool! I have missed that GA. My additions to make it build for arm also: #1009

@mlocati
Copy link
Owner

mlocati commented Nov 22, 2024

I've just published version 2.7.0 with multi-arch support (thanks @baschny!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants