-
-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add multi platform support to contrib.docker through docker buildx #3143
Add multi platform support to contrib.docker through docker buildx #3143
Conversation
This reverts commit 6956a1a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you!
It's fascinating to see the multi-arch images supported by Mill. There are two comments on the PR:
The
|
For 1. I ignored the multi-arch image option a bit as currently that is not enabled by default on docker: "By default, Docker can build for only one platform at a time." One can of course make it work as described in the article. For those that know what they are doing, they could always pass it as a single string. Changing to an Array is of course an option, but one should definetly point out that issue then in the docu. For 2.
calling "_.docker.push" works as expected for me. Are you referring to that push? |
Follow the Blog: https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ The buildx is usually used to build Multi-Platform Image.
The command can work correctly in most environments when the docker build is installed. :-) For example Ubuntu x86. The command of build and push cannot split: docker/buildx#1152 For multi-arch image
can work correctly |
It can easily be verified locally by running docker push for any architecture image available locally. For 1. as written - one can definitely go that route - but as the rest of the plugin also "just" covers the most common cases (e.g. not being able to add any files etc) i opted for the simpler approach that should always work |
A very minor change to the contrib.docker plugin (and its docs).
Allows to build for other architectures - a use case that becomes more and more useful with ARM architectures becoming more relevant.
Relevant docs:
docker buildx (Buildkit)