From fc48634c9ebe7b927a99dfc17d955793108c8fee Mon Sep 17 00:00:00 2001 From: Marcus Lagergren <1062473+lagergren@users.noreply.github.com> Date: Sat, 7 Nov 2026 19:07:48 +0100 Subject: [PATCH] Share the game layer between the amd64 and arm64 images The release builds the amd64 image for its smoke test first, then both platforms, reusing that amd64 build. The game's COPY layer was diffed against each platform's JRE, so the two copies of the same 184 MB of jars got different digests, and ghcr.io stored the game twice per release, as 0.9.2 shows. COPY --link builds the layer on its own, so both platforms use one blob. Podman builds the image with --link too. --- deploy/docker/Dockerfile.bitmap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/docker/Dockerfile.bitmap b/deploy/docker/Dockerfile.bitmap index 5a079ccb..2fcd95ba 100644 --- a/deploy/docker/Dockerfile.bitmap +++ b/deploy/docker/Dockerfile.bitmap @@ -49,7 +49,9 @@ ENV RYLWEEN_BITMAP_SAVE_FILE=/data/saves/world.rsave ENV RYLWEEN_AUTH_SECURE_COOKIES=true WORKDIR /app -COPY --from=builder /src/runtimes/runtime-bitmap-web/build/install/rylween-bitmap-web /app/rylween-bitmap-web +# --link builds this layer apart from the JRE under it, so the amd64 and arm64 +# images share one copy of the game instead of storing it twice. +COPY --link --from=builder /src/runtimes/runtime-bitmap-web/build/install/rylween-bitmap-web /app/rylween-bitmap-web ENV PATH="/app/rylween-bitmap-web/bin:${PATH}" VOLUME ["/data"]