-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support multi platform Docker build (buildx) #151
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # pom.xml
…i-platform-buiild
I think this is ready, can someone review? |
I have a Mac now to test with. I'll get this done tomorrow before doing the new Cantaloupe release. |
Also, today you only push amd64 image to hub. Could you look at officially publishing arm image as well. Not just for Mac but many Linux systems now run arm. |
Looking into GitHub Action arm runners. |
I see several explicit amd64 references in Dockerfile (kakadu) and perhaps elsewhere, so probably needs more effort if you want to take advantage of some of the native libraries being pulled in. However, wrt docker image builds, it should be fully possible to build both amd and arm images on the same runner through use of |
@janhoy Re: "However, wrt docker image builds, it should be fully possible to build both amd and arm images on the same runner through use of docker build." Is that right? It looks to me like the docker-maven-plugin builds the image for the platform on which the build is happening if it's one of the supplied ${docker.platforms} when more than one is supplied. That makes me think we could have a ${docker.platforms} value for all supported platforms, but that we'll need a runner for each of those platforms(?) |
One of our programmers is going to look into running Mac GitHub Action runners to get automated builds (minus the Kakadu stuff) using that going. |
If you continue reading on that same page, you will find that:
I.e. a developer will get a local build for her own platform when invoking "build" target. But during release, when you invoke the "push" target, buildx will build and push all architectures (using QEmu) as normal. |
Just updating this ticket... The build works as a multi-arch build, but to do the deploy/release I have to replace the I can do this locally (and push to DockerHub), but cannot do this on GitHub Actions (I don't think) unless I configure a Docker-in-Docker setup (or run my Actions runner as a self-hosted runner). Still working on it though... Edit: Actually, this seems to only be a problem when also trying to do attestation (sbom/provenance) with the multiarch release. |
Building on my mac (M1) I only get an
arm64
build, and it does not work on intel machines. So I need to build with multi architectures. This PR enables that. (still testing)