Multiplatform build
This makes a start at fixing #216.
Changes:
- Add buildx option to Makefile
- Add buildx install to github action
- Add PLATFORMS variable to github actions
- Document building with
makein README
I will check the platforms now...
-
[ ] linux/arm64
-
[ ] linux/amd64
134.1 Processing triggers for libc-bin (2.31-13+deb11u11) ... 134.3 Segmentation fault (core dumped) 134.5 Segmentation fault (core dumped) 134.5 dpkg: error processing package libc-bin (--configure): 134.5 installed libc-bin package post-installation script subprocess returned error exit status 139https://github.com/docker/buildx/issues/314
-
[ ] linux/arm/v8
-
[ ] linux/arm/v7
-
[ ] linux/arm/v6
The alpine build works.
Thank you for the PR.
When I tested the QEMU solution some time ago, I ran into a few emulation issues. Because of that, I am much more cautious with this technique. However, I might need to re-evaluate some things since then. https://github.com/postgis/docker-postgis/issues/393#issuecomment-2398998903
@ImreSamu Thanks for the link, I had a look at your PR. You seem to be well versed in what to change in the Docker files. I do not know that so much...
Since #216 mentions this: https://github.com/postgis/docker-postgis/issues/216#issuecomment-981824739 It seems builds are already been done. I wonder why alpine builds work but buster builds do not under arm64 for this configuration I have here... Official alpine images would be a start or adding a link to the other Repository mentioned here in the README. I can check more about why the buster build fails...
This now only adds the buildx possibility to build the image for another platform. The CI is not affected. I will create a new PR for the CI.
Reason: https://github.com/postgis/docker-postgis/issues/216#issuecomment-2639954177
To build multiplatform images, I think it's no longer necessary to explicitly invoke with buildx so the conditionals that check PLATFORM and programmatically form a BUILD expression can be removed. Could I ask that these changes be made in this PR and rebased on top of the latest master branch?
Hi! Do you have any ideas when this is going to be available?
Thanks, @phillipross! Although the PR is now reduced to:
- ~Add buildx option to Makefile~
- ~Add buildx install to github action~
- ~Add PLATFORMS variable to github actions~
- Document building with make in README
At the moment yes, but it can be aligned with the upcoming work to split out the CI runs into running separate runners for separate platforms based specifying separate PLATFORMS value. That's the plan anyway. Thanks!