54 lines
1.8 KiB
Text
54 lines
1.8 KiB
Text
# Godot 4.6.2 Linux headless — freeze-proof runtime for asset import + GUT tests.
|
|
# See ~/.claude/plans/godot-container-runner.md for why this exists.
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
ARG GODOT_VERSION=4.6.2
|
|
ARG GODOT_RELEASE=stable
|
|
# Pinned official SHA256 — update together with GODOT_VERSION.
|
|
# Compute via: sha256sum Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip
|
|
ARG GODOT_SHA256=
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
wget \
|
|
unzip \
|
|
libgl1-mesa-glx \
|
|
libfontconfig1 \
|
|
libxi6 \
|
|
libxrandr2 \
|
|
libxcursor1 \
|
|
libxinerama1 \
|
|
libasound2 \
|
|
libpulse0 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Detect arch at build time so this image works on both Apple-silicon Docker
|
|
# Desktop (linux/arm64) and amd64 hosts.
|
|
RUN set -eux; \
|
|
arch="$(dpkg --print-architecture)"; \
|
|
case "$arch" in \
|
|
arm64) godot_arch="linux.arm64" ;; \
|
|
amd64) godot_arch="linux.x86_64" ;; \
|
|
*) echo "unsupported arch: $arch" >&2; exit 1 ;; \
|
|
esac; \
|
|
url="https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${GODOT_RELEASE}/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_${godot_arch}.zip"; \
|
|
wget -q -O /tmp/godot.zip "$url"; \
|
|
unzip -q /tmp/godot.zip -d /opt; \
|
|
mv /opt/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_${godot_arch} /usr/local/bin/godot; \
|
|
chmod +x /usr/local/bin/godot; \
|
|
rm /tmp/godot.zip
|
|
|
|
# Runtime user with a stable uid/gid so bind-mounted files don't get chown'd
|
|
# by container writes. Docker Desktop on macOS handles uid mapping
|
|
# transparently, so picking 1000 is fine.
|
|
RUN useradd --create-home --uid 1000 --shell /bin/bash godot
|
|
|
|
USER godot
|
|
WORKDIR /work
|
|
|
|
ENTRYPOINT ["/usr/local/bin/godot"]
|
|
CMD ["--version"]
|