Basic game installation WIP.

This commit is contained in:
2019-02-27 12:03:02 +09:00
parent 52b84fb309
commit 9908c7eabe
2 changed files with 47 additions and 2 deletions

42
Dockerfile Normal file
View File

@@ -0,0 +1,42 @@
# These don't have to be replaced unless you, for example,
# want to refer to a locally built version
ARG STEAM_IMG=docker-steamcmd
ARG STEAMCMD_TAG=latest
FROM ${STEAM_IMG}:${STEAMCMD_TAG}
# E.g. To install Counter Strike Source, run:
# docker build --build-arg GAME_ID=232330 --rm -t game-cssource:latest .
ARG GAME_ID
# Preserve the ID specified for future reference
ENV INSTALLED_GAME_ID=${GAME_ID}
USER steam
VOLUME [ ${DIR_GAME} ]
# Installs the game specified in GAME_ID
# Note: The game is installed in the DIR_GAME directory
# prepared by docker-steamcmd.
WORKDIR ${DIR_STEAMCMD}
# TODO: Check if it's worth using proper steam login
# not sure if Steam has rate limiting on anonymous accounts
RUN ./steamcmd.sh \
+@NoPromptForPassword 1 \
+login anonymous \
+force_install_dir ${DIR_GAME} \
+app_update ${GAME_ID} validate \
+quit
CMD [ "./steamcmd.sh" ]
# CMD [ "./steamcmd.sh", \
# "+@NoPromptForPassword 1", \
# "+login anonymous", \
# "+force_install_dir ${DIR_GAME}", \
# "+app_update ${GAME_ID} validate", \
# "+quit" \
# ]

View File

@@ -1,2 +1,5 @@
# docker-steamcmd-install
Barebones SteamCMD game installation using my docker-steamcmd image.
# SteamCMD with assumed game installation for Docker
Uses my [docker-steamcmd](https://github.com/hellodeibu/docker-steamcmd) image. This barebones image is handy if you want to immediately install a specific game using SteamCMD. Simply provide the STEAM_APP_ID environment variable and that's it.
Note: You probable want to use this image as a build stage for your game-specific image, so that you can do additional setup and configuration on top of a downloaded and ready to go game setup.