docker-postgis icon indicating copy to clipboard operation
docker-postgis copied to clipboard

Multiplatform build

Open niccokunzmann opened this issue 11 months ago • 7 comments

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 make in 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 139
    

    https://github.com/docker/buildx/issues/314

  • [ ] linux/arm/v8

  • [ ] linux/arm/v7

  • [ ] linux/arm/v6

niccokunzmann avatar Feb 05 '25 15:02 niccokunzmann

The alpine build works.

niccokunzmann avatar Feb 05 '25 17:02 niccokunzmann

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 avatar Feb 05 '25 18:02 ImreSamu

@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...

niccokunzmann avatar Feb 05 '25 18:02 niccokunzmann

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

niccokunzmann avatar Feb 06 '25 14:02 niccokunzmann

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?

phillipross avatar Mar 03 '25 03:03 phillipross

Hi! Do you have any ideas when this is going to be available?

luis-telesforo avatar Mar 25 '25 00:03 luis-telesforo

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!

phillipross avatar Jun 22 '25 18:06 phillipross