Fetch games into a volume at runtime instead of baking them into the image

927MB of the image was just t7g's two CD ISOs, which can't be meaningfully
compressed (already-compressed FMV/audio). Move the smbget/unzip step out
of the Dockerfile and into scripts/fetch_games.sh, run from server.sh on
container start: it populates GAMES_HOME on first run and skips the fetch
if games are already present. run.sh mounts a named volume so the games
survive --rm restarts instead of being re-downloaded every time. Image
drops from 1.6GB to ~690MB; first container start now needs network access
to the vlda-01 SMB share to seed the volume.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
This commit is contained in:
2026-07-28 08:25:26 +02:00
co-authored by Claude Sonnet 5
parent 79cc239dca
commit 44bbd00336
5 changed files with 38 additions and 16 deletions
+10 -4
View File
@@ -1,6 +1,12 @@
# TODO
- ~~Reduce image size of `jayfield/dosbox-novnc` (currently ~2.3GB).~~ Done: merged the
game download/extract steps and the unzip/smbclient install into a single layer (so the
downloaded zips and the packages only needed to extract them no longer persist in the
final image). 2.31GB -> 1.6GB.
- ~~Reduce image size of `jayfield/dosbox-novnc` (currently ~2.3GB).~~ Done in two steps:
1. Merged the game download/extract steps and the unzip/smbclient install into a single
layer (so the downloaded zips and the packages only needed to extract them no longer
persist in the final image). 2.31GB -> 1.6GB.
2. Stopped baking the games into the image at all (927MB of that was just t7g's two CD
ISOs). `scripts/fetch_games.sh` now downloads them from the SMB share into
`${GAMES_HOME}` (`/opt/games`) on first container start instead, skipping the fetch if
already present. `run.sh` mounts a named volume (`dosbox-games`) so the games persist
across `--rm` restarts. 1.6GB -> ~690MB. Container now needs network access to
`vlda-01` at runtime (not just build time) for the first start.