Skip to content

Conversation

@namuuCY
Copy link
Contributor

@namuuCY namuuCY commented Dec 20, 2025

Description

This PR addresses an issue where docker_db.sh fails to pull PostgreSQL 17/18 images on Apple Silicon (ARM64) devices due to missing ARM64 manifests in the postgis/postgis image.

Changes

  1. Support Apple Silicon: Added --platform linux/amd64 flag for PostgreSQL(applied globally) containers when running on macOS (IS_OSX). This forces Rosetta 2 emulation on ARM Macs and is safe for Intel Macs.
  2. Fix Typo: Corrected the environment variable name in postgresql_18 function (DB_IMAGE_POSTGRESQL_17 -> DB_IMAGE_POSTGRESQL_18).

Verification

  • macOS (ARM64 - M4): Verified that postgresql, postgresql_13~postgresql_18 starts successfully with this change.
  • Linux / CI: Relying on CI to verify that Linux builds are unaffected (Logic is guarded by IS_OSX).

Related Jira Issue

https://hibernate.atlassian.net/browse/HHH-20009


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@namuuCY namuuCY force-pushed the docker-shell branch 2 times, most recently from 60dcfe8 to e9c2cda Compare December 20, 2025 13:04
Copy link
Member

@beikov beikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though we should probably define these platform options more globally and use them for all postgresql versions.

- Added --platform linux/amd64 to postgres(Applied globally) functions for macOS environment.
  The current postgis images lack ARM64 manifests, requiring amd64 emulation via Rosetta 2.
- Fixed a typo in postgresql_18 function referencing the wrong environment variable (_17 -> _18).

Signed-off-by: namucy <[email protected]>
@namuuCY
Copy link
Contributor Author

namuuCY commented Dec 22, 2025

@beikov
Thanks for the review and you are right.

I realized that previous versions (13-16) were also pulling amd64 images and running via Rosetta implicitly (fallback), whereas 17/18 fail because of stricter manifest lists.
Since they all run as amd64 on Apple Silicon anyway, applying the platform flag globally is the correct approach for consistency and explicitness.

I have updated the PR to apply this to all PostgreSQL versions. Thanks!

@beikov beikov merged commit 82281c5 into hibernate:main Dec 22, 2025
6 of 7 checks passed
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.

2 participants