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
32 lines
970 B
Docker
32 lines
970 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM ich777/novnc-baseimage
|
|
|
|
ENV DISPLAY_NUM=99
|
|
ENV DISPLAY=:${DISPLAY_NUM}
|
|
ENV GAMES_HOME=/opt/games
|
|
ENV SCRIPTS_HOME=/opt/scripts
|
|
ENV PATH=${PATH}:${SCRIPTS_HOME}
|
|
|
|
# unzip/smbclient are needed at runtime now too: the games are no longer baked into the
|
|
# image, fetch_games.sh pulls them into the ${GAMES_HOME} volume on first container start.
|
|
RUN apt-get update && \
|
|
apt-get -y install --no-install-recommends dosbox alsa-utils unzip smbclient && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN openssl req -x509 -nodes -newkey rsa:2048 -keyout /tmp/novnc.key -out /tmp/novnc.pem -days 3650 -subj "/C=US/ST=NY/L=NY/O=NY/OU=NY/CN=NY emailAddress=email@example.com"
|
|
RUN touch /root/.Xauthority
|
|
|
|
RUN mkdir -p ${GAMES_HOME}
|
|
VOLUME ${GAMES_HOME}
|
|
|
|
ADD scripts ${SCRIPTS_HOME}
|
|
WORKDIR /
|
|
|
|
EXPOSE 60${DISPLAY_NUM}
|
|
EXPOSE 5900
|
|
|
|
ENTRYPOINT ["/opt/scripts/server_start.sh", "/opt/scripts/server.sh"]
|
|
|
|
# see also
|
|
# https://github.com/ich777/docker-krusader
|