Skip to content

ci: build arm64 docker image#1587

Closed
mentos1386 wants to merge 1 commit into
dimitri:mainfrom
mentos1386:patch-1
Closed

ci: build arm64 docker image#1587
mentos1386 wants to merge 1 commit into
dimitri:mainfrom
mentos1386:patch-1

Conversation

@mentos1386

@mentos1386 mentos1386 commented Jun 8, 2024

Copy link
Copy Markdown

Adding support to build arm64 docker images.

Fixes: #1513

Adding support to build arm64 docker images.
@dimitri

dimitri commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Thank you for the contribution and for opening issue #1513 — arm64 Docker support is a genuinely useful feature and we've now added it, just not to the v3 image.

The problem with adding arm64 to the SBCL-based is QEMU: compiling pgloader's Common Lisp codebase under software emulation takes 2–4 hours on a standard GitHub Actions runner, making multi-arch CI impractical there.

The good news is that the Clojure/JVM v4 is the right place for this. The JVM build produces a platform-independent JAR, so arm64 support costs almost nothing: PR #1744 adds with native linux/amd64 and linux/arm64 support, built without QEMU overhead. The docs cover it under Docker image (v4).

Closing in favour of #1744.

@dimitri dimitri closed this Jun 27, 2026
dimitri added a commit that referenced this pull request Jun 27, 2026
* feat(docker): publish multi-arch v4 image to ghcr.io

Add a new docker-publish-v4.yml workflow that builds and pushes a
linux/amd64 + linux/arm64 Docker image for the Clojure/JVM v4 build
to ghcr.io/dimitri/pgloader-v4.

The JVM is ideally suited for multi-arch: the Clojure build step
produces a platform-independent JAR.  The builder stage in
clojure/Dockerfile now carries --platform=$BUILDPLATFORM so the
Clojure compilation always runs natively on the GitHub Actions host
(linux/amd64), producing the JAR in seconds.  QEMU is only needed
for the runtime stage, where it executes a handful of shell commands
to set up the non-root user — trivially fast.

Publication strategy mirrors the v3 workflow:
  - push to main  → ghcr.io/dimitri/pgloader-v4:latest
  - semver tag    → ghcr.io/dimitri/pgloader-v4:<version>
  - pull request  → build only, no push

GHA build-cache (type=gha) is wired up so layer reuse applies across
both platforms on repeated pushes.

Closes #1587.
Docs: add Docker (v4) subsection to install.rst.

* fix(docker): use stable pgloader.jar symlink in runtime COPY

The builder stage creates the JAR at:
  target/pgloader-v4-${PGLOADER_VERSION}.jar  (default 4.0.0-SNAPSHOT)

and a stable symlink target/pgloader.jar pointing to it.
The previous COPY referenced the hardcoded version 0.1.0-SNAPSHOT
which never existed, causing the build to fail.

Use the symlink instead; Docker COPY follows it to the real JAR.
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.

docker image error The integrity of this image is possibly compromised

2 participants