Skip to content

feat: add linux/arm64 multi-arch image support - #152

Open
gbartolini wants to merge 5 commits into
mainfrom
dev/151
Open

gbartolini wants to merge 5 commits into
mainfrom
dev/151

Conversation

@gbartolini

Copy link
Copy Markdown
Contributor

Introduces linux/arm64 support alongside the existing linux/amd64 images.

  • Dockerfile: drop the hardcoded --build=x86_64-linux-gnu configure flag (let it auto-detect) and compute --libdir from dpkg-architecture -qDEB_HOST_MULTIARCH instead of hardcoding the amd64 multiarch triplet.
  • docker-bake.hcl: turn the target's platforms list into an overridable variable, defaulting to both linux/amd64 and linux/arm64.
  • .github/workflows/reusable-build.yml (new): builds each architecture natively in its own matrix job (amd64 on the existing runner, arm64 on ubuntu-24.04-arm) and merges the two per-arch images into a single multi-arch manifest per tag via docker buildx imagetools create. PostgreSQL is compiled from source, which is CPU-bound, so this avoids cross-building arm64 through QEMU emulation on an amd64 runner, which would multiply build time considerably.
  • build.yml, build-commitfest.yml, continuous-delivery.yml: extract the existing input/tag-resolution steps into a prepare job and delegate the actual build to the new reusable workflow. On pull_request runs, continuous-delivery.yml now builds both architectures to validate the Dockerfile without pushing or publishing a manifest (previously it built only amd64).
  • README.md: document the multi-arch build/merge approach and how local docker buildx bake builds are affected (QEMU emulation for the non-native platform).

Closes #151

Assisted-by: Claude

@gbartolini
gbartolini requested a review from a team as a code owner August 30, 2026 10:41
@gbartolini gbartolini changed the title feat: add linux/arm64 multi-arch image support feat: add linux/arm64 multi-arch image support Aug 30, 2026
Introduces linux/arm64 support alongside the existing linux/amd64
images.

- Dockerfile: drop the hardcoded `--build=x86_64-linux-gnu` configure
  flag (let it auto-detect) and compute `--libdir` from
  `dpkg-architecture -qDEB_HOST_MULTIARCH` instead of hardcoding the
  amd64 multiarch triplet.
- docker-bake.hcl: turn the target's `platforms` list into an
  overridable variable, defaulting to both linux/amd64 and
  linux/arm64.
- .github/workflows/reusable-build.yml (new): builds each architecture
  natively in its own matrix job (amd64 on the existing runner, arm64
  on `ubuntu-24.04-arm`) and merges the two per-arch images into a single
  multi-arch manifest per tag via `docker buildx imagetools create`.
  PostgreSQL is compiled from source, which is CPU-bound, so this
  avoids cross-building arm64 through QEMU emulation on an amd64
  runner, which would multiply build time considerably.
- build.yml, build-commitfest.yml, continuous-delivery.yml: extract
  the existing input/tag-resolution steps into a `prepare` job and
  delegate the actual build to the new reusable workflow. On
  `pull_request` runs, continuous-delivery.yml now builds both
  architectures to validate the Dockerfile without pushing or
  publishing a manifest (previously it built only amd64).
- README.md: document the multi-arch build/merge approach and how
  local `docker buildx bake` builds are affected (QEMU emulation for
  the non-native platform).

Closes #151

Assisted-by: Claude

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
gbartolini and others added 2 commits September 3, 2026 16:45
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
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.

Multi-architecture support with linux/arm64

2 participants