This base container image provides everything you need to run a linux based dedicated server which is to be installed
via SteamCMD. It's based on the latest packages provided by ubuntu:devel and is built weekly.
FROM docker.io/rouhim/steamcmd:latest
USER $USER
# Set the following environment variables: STEAM_APP_ID, STARTUP_COMMAND
# STEAM_APP_ID: The Steam App ID of the game server to install
ENV STEAM_APP_ID "123456789"
# STARTUP_COMMAND: The command to run to start the server,
# the current working directory is the server directory ($SERVER_DIR)
ENV STARTUP_COMMAND "server -configpath "$SERVER_CONFIG_DIR""
# Optional pre.sh script to run before the server starts
COPY pre.sh $USER_HOME/pre.sh
# Optional post.sh script to run after the server stops
COPY post.sh $USER_HOME/post.sh
If you want to install additional packages via apt,
make sure to become USER root before executing apt commands.
Obviously, you should also switch back to USER $USER after installing the packages.
The following environment variables are available in the base image:
| Variable | Default Value | Description |
|---|---|---|
USER | ubuntu | The user to run the server as |
GROUP | ubuntu | The group to run the server as |
USER_HOME | /home/$USER | The home directory of the user |
STEAMCMD | $USER_HOME/steamcmd/steamcmd.sh | The path to the steamcmd executable |
SERVER_DIR | /data | The directory where the server files are stored |
SERVER_CONFIG_DIR | /config | The directory where the server configuration files are stored |
STEAM_USERNAME | `` | Steam account username (empty = use anonymous login) |
STEAM_PASSWORD | `` | Steam account password (required if STEAM_USERNAME is set) |
STEAM_GUARD_CODE | `` | Steam Guard 2FA code (optional; if set, passed to SteamCMD login) |
FAST_BOOT | false | If set to true, the server will not be installed / updated / validated on start |
By default this image uses login anonymous when running SteamCMD.
Some dedicated servers (or private/beta branches) require an authenticated Steam account to download. In that case set:
STEAM_USERNAMESTEAM_PASSWORDIf Steam Guard (2FA) is enabled for the account, set STEAM_GUARD_CODE at container start.
Notes:
~/.steam/. If you mount a persistent volume for $USER_HOME/.steam/, restarts may not require Steam Guard again.docker inspect and similar tooling. Prefer Docker/Kubernetes secrets for production, and avoid baking credentials into images.Content type
Image
Digest
sha256:f17d9ae27…
Size
87.2 MB
Last updated
3 days ago
docker pull rouhim/steamcmd