feat(docker): switch base from barichello/godot-ci to debian:bookworm-slim

Drop the dependency on barichello/godot-ci as a base image (Ubuntu, ~2.4GB
before this repo adds anything, most of it Android SDK/NDK weight this image
never uses). Download Godot's editor and export templates directly from its
official godot-builds releases instead, the same source barichello's own
Dockerfile pulls from.

Alpine was the first candidate considered and rejected: official Godot and
Blender binaries are glibc-only, and Alpine's musl-native alternatives for
both live only on its unpinned edge repo (see wayfinder tickets #4, #5, #6).
A glibc-slim distro turned out not to be meaningfully smaller than Ubuntu
either (#8) — but dropping barichello's Android-SDK-laden base entirely
still nets a real win: local build measured 2343MB total (Godot + export
templates + Blender + mingw-w64 + X11 dev libs) vs. barichello's bare base
alone at 2460MB before this repo's layers were ever added.

publish.yml's barichello-tag gate is replaced with a check against the
godot-builds release we now actually depend on.

Decided via wayfinder map #2, ticket #7:
#7
This commit is contained in:
2026-08-06 23:11:53 +02:00
parent 20d3660485
commit 8feeb2b428
3 changed files with 52 additions and 21 deletions
+28 -9
View File
@@ -1,16 +1,25 @@
# GODOT_VERSION selects the barichello/godot-ci base tag (Godot 4.0+ only — see
# docs/handoff/godot-ci-custom-image.md). BLENDER_URL is the tarball to bake in;
# GODOT_VERSION is a stable Godot release tag (e.g. "4.7.1", no "-stable" suffix — Godot 4.0+
# only, see docs/handoff/godot-ci-custom-image.md). BLENDER_URL is the tarball to bake in.
# .gitea/workflows/publish.yml always resolves both at build time via
# scripts/resolve-godot-version.sh and scripts/resolve-blender-url.sh. The
# defaults below are only a fallback for a plain local `docker build`.
# scripts/resolve-godot-version.sh and scripts/resolve-blender-url.sh. The defaults below are
# only a fallback for a plain local `docker build`.
#
# Godot itself is downloaded straight from its official GitHub releases (godot-builds), the same
# source barichello/godot-ci's own Dockerfile uses — this image no longer depends on that image
# as a base. Decided via wayfinder map https://git.arthurerlich.de/haylan/godot-ci/issues/2,
# ticket https://git.arthurerlich.de/haylan/godot-ci/issues/7: Alpine was considered and rejected
# (official Godot/Blender binaries are glibc-only, and Alpine's musl-native alternatives live
# only on its unpinned `edge` repo); a plain glibc-slim base doesn't cost the compatibility risk.
ARG GODOT_VERSION=4.7.1
FROM barichello/godot-ci:${GODOT_VERSION}
FROM debian:bookworm-slim
ARG GODOT_VERSION
ARG BLENDER_URL=https://download.blender.org/release/Blender4.2/blender-4.2.3-linux-x64.tar.xz
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl unzip xz-utils \
libfontconfig1 \
build-essential scons pkg-config xz-utils curl \
build-essential scons pkg-config \
libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev \
libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev libwayland-dev \
mingw-w64 \
@@ -21,9 +30,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix \
&& update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix \
&& rm -rf /var/lib/apt/lists/* \
# Blender is not bundled in barichello/godot-ci, and Ubuntu's apt package lags
# (stuck on 4.0.2 on noble) — install the resolved tarball straight from
# download.blender.org instead of `apt-get install blender`.
# Godot editor + export templates, straight from the official release (same URL shape
# barichello/godot-ci's own Dockerfile uses) — stable releases only, matching what
# scripts/resolve-godot-version.sh resolves.
&& curl -fsSLO "https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip" \
&& curl -fsSLO "https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz" \
&& mkdir -p "/root/.local/share/godot/export_templates/${GODOT_VERSION}.stable" \
&& unzip -q "Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip" \
&& mv "Godot_v${GODOT_VERSION}-stable_linux.x86_64" /usr/local/bin/godot \
&& unzip -q "Godot_v${GODOT_VERSION}-stable_export_templates.tpz" \
&& mv templates/* "/root/.local/share/godot/export_templates/${GODOT_VERSION}.stable/" \
&& rm -rf "Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip" "Godot_v${GODOT_VERSION}-stable_export_templates.tpz" templates \
# Blender is not bundled anywhere here — install the resolved tarball straight from
# download.blender.org instead of an apt package.
&& curl -fsSL "$BLENDER_URL" -o /tmp/blender.tar.xz \
&& mkdir -p /opt/blender \
&& tar -xJf /tmp/blender.tar.xz -C /opt/blender --strip-components=1 \