Files
APWorldTester/container/Dockerfile.test
2026-09-06 15:12:38 +02:00

21 lines
763 B
Docker

# Unprivileged wrapper for the generation tests.
#
# Upstream's image runs as root and leaves /.local root-owned, so running
# it as the host user fails before generation starts (PermissionError on
# /.local) and running it as root leaves root-owned seeds in the mounted
# output directory. Two lines fix both, and they are the only difference
# from the base image.
#
# Built once per Archipelago tag, not per apworld test, so the cost of
# the recursive chown is paid once and amortised over a few hundred
# generations.
ARG BASE_IMAGE=archipelago:latest
FROM ${BASE_IMAGE}
ARG RUNNER_UID=1000
ARG RUNNER_GID=1000
RUN chown -R ${RUNNER_UID}:${RUNNER_GID} /app /.local 2>/dev/null || chown -R ${RUNNER_UID}:${RUNNER_GID} /app
USER ${RUNNER_UID}:${RUNNER_GID}