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

Add arm64 support using buildx #256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

odidev
Copy link

@odidev odidev commented Sep 22, 2021

The following file has been created and modified:
Added support of buildx in Makefile to build and push the docker image for arm64 and amd64 platforms.
Updated .github/workflows/main.yml to build, test and push the images for the latest versions to docker hub.

Signed-off-by: odidev odidev@puresoftware.com

Makefile Outdated Show resolved Hide resolved
@odidev odidev force-pushed the support-arm branch 4 times, most recently from 7ebe031 to 78f44ff Compare September 23, 2021 06:15
@odidev
Copy link
Author

odidev commented Sep 24, 2021

@phillipross,
I have made suggested changes. Please review and let me know your feedback.

@ImreSamu
Copy link
Member

@odidev :
question: As I see 6 images have been removed from the CI matrix; Is it possible to keep them only in the linux/amd64 version?

A few hours ago .. the upstream postgres image has been upgraded to bullseye .. so probably needs some extra check.

@phillipross
Copy link
Contributor

I think there's going to be more work needed to get everything working well here with both platforms.

  1. We would not want to exclude versions/variants from the build simply for not having arm builds available within the distributions. I think the makefile and update scripts will need work to keep track of which versions of which distros provide the packages for which platform, and then build what's available.
  2. The build-test-push workflow(s) should remain decoupled so that the CI (and devs) can invoke each stage and observe failures at that stage, whether it's building the image, testing the image, or pushing to the image repo. I know this is a little difficult with buildx and multiplatform images, but I believe it's possible.

I see that @odidev is actively pushing changes to the PR, but as it stands now, the PR only builds the multiplatform images as part of the push target which is problematic since the push target is only invoked when PRs are merged to the main repo. This needs to change so that the build targets build the images, the test targets run the tests against the images that are built (this is a challenge, i know), and then the push target pushes the blessed images to the image repo.

I'm not sure if this PR is the best place to discuss all of this or not. Maybe we should use the existing issue #216 to discuss?

Signed-off-by: odidev <odidev@puresoftware.com>
@RyanSiu1995
Copy link

Hi there, is there any update on this PR?

@Tob1as
Copy link

Tob1as commented Oct 31, 2021

Hi, would it also be possible to add additional arm32 (linux/arm/v7) support?

@phillipross
Copy link
Contributor

Hi there, is there any update on this PR?

@RyanSiu1995 No update yet, we're still working on it

Hi, would it also be possible to add additional arm32 (linux/arm/v7) support?

@Tob1as I'm sure it will be possible, but with some work.

@Its-Alex
Copy link

Hi, any update on this MR pls? 🙏

@everdrone
Copy link

Any update on this?

@dmorehouse
Copy link

What remains to be done to add arm64 (linux/arm64/v8) as an architecture in the official postgis DockerHub images? I'm happy to help in any capacity. I see a huge performance loss running the AMD64 images on the new Apple M series Macs. The official Postgres images have added linux/arm64/v8 to all supported images. Given the popularity of this platform I think it makes sense to support it as an official architecture.

@TimothyLoyer
Copy link

I am currently resorting to copying the Dockerfile and scripts into our development environment so that my co-workers using Apple laptops with M1/2 chips are able to run Postgres + PostGIS by building it themselves. I just revisited that code because PostGIS 3.3.2 appears to have been removed from Apt and the build broke - it took me quite a few minutes to understand why I would ever have copied someones Dockerfile so closely.

I don't understand why there is no ARM support when it is fully supported by the base image/dependencies in the Dockerfile; these architectures have gained a ton of popularity in the past 5 years- especially in cloud computing where PostGIS is needed.

@jamesdh
Copy link

jamesdh commented Jun 12, 2023

Compounding matters is that the docker-postgis team doesn't have any real form of release management. They have a single branch that they keep up to the latest version, and that's it. So for those of us on arm64:

  • No official images are available via DockerHub
  • We cannot easily pinpoint a source tag that would allow us to check out a corresponding version and build it ourselves.

We're stuck with having to use the latest version. We'd prefer to match our Google Cloud SQL environment, which supports only up to 3.1.8, not 3.3.3.

@nitrag
Copy link

nitrag commented Jan 23, 2024

Hello.....? I'm stumped. I'm not sure what else to say. Bump, please!

@ImreSamu
Copy link
Member

ImreSamu commented Jan 23, 2024

Hello.....? I'm stumped. I'm not sure what else to say. Bump, please!

@nitrag :

Work in progress ...

status: testing ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.