lgsm local mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel Gibbs 4f60bf1d5f
refactor(workflow): remove unused keepalive job
1 day ago
.devcontainer feat(devcontainer): add Docker outside of Docker feature 1 day ago
.github refactor(workflow): remove unused keepalive job 1 day ago
.vscode chore: synced local './' with remote 'docker/' (#75) 1 day ago
.dockerignore misc files 3 years ago
.editorconfig fix(editorconfig): update indentation settings for consistency 1 day ago
.gitignore Auto stash before merge of "main" and "origin/main" 1 day ago
.prettierrc.json chore: synced local './' with remote 'docker/' (#75) 1 day ago
.yamllint.yml 🔄 synced file(s) with dgibbs64/repo-sync (#28) 2 years ago
Dockerfile.ubuntu-2004 fix(docker): optimize cleanup commands in Dockerfiles 1 day ago
Dockerfile.ubuntu-2204 fix(docker): optimize cleanup commands in Dockerfiles 1 day ago
Dockerfile.ubuntu-2404 fix(docker): optimize cleanup commands in Dockerfiles 1 day ago
LICENSE.md docs(license): update copyright year(s) 8 months ago
README.md Auto stash before merge of "main" and "origin/main" 1 day ago
package-lock.json Auto stash before merge of "main" and "origin/main" 1 day ago
package.json Auto stash before merge of "main" and "origin/main" 1 day ago

README.md

SteamCMD Docker Image

SteamCMD

Docker Pulls Build Status Codacy grade SteamCMD Badge MIT License

Lightweight, daily-built SteamCMD base image for game server automation.

Quick Start

Pull the latest image and open SteamCMD interactive prompt:

docker pull gameservermanagers/steamcmd:latest
docker run -it --rm gameservermanagers/steamcmd:latest

Download (update) a dedicated server into the current host directory (example: CS2 / app 730):

docker run -it --rm \
  -v "$PWD:/data" \
  gameservermanagers/steamcmd:latest \
  +force_install_dir /data +login anonymous +app_update 730 validate +quit

Persist Steam content in a named volume:

docker volume create steamcmd-data
docker run -it --rm -v steamcmd-data:/home/steam/Steam gameservermanagers/steamcmd:latest +login anonymous +quit

Tags & Platforms

Tag(s) Ubuntu Release Notes
latest, ubuntu 24.04 LTS (Noble) Alias to most recent LTS
ubuntu-24.04 24.04 LTS Current LTS
ubuntu-22.04 22.04 LTS Previous LTS
ubuntu-20.04 20.04 LTS Legacy (receives security updates)
ubuntu-18.04 18.04 LTS Legacy / nearing EOL upstream

Currently built for: linux/amd64.

Features

  • Daily scheduled build + build on Dockerfile changes
  • Non-root steam user (security best practice)
  • Minimal packages; apt caches cleaned
  • HEALTHCHECK (lightweight SteamCMD invocation)
  • Multi-version tag set for pinning

Usage Examples

Anonymous login and quit (cache initialization):

docker run --rm gameservermanagers/steamcmd:latest +login anonymous +quit

Install/Update Valheim dedicated server (app 896660) into a local folder:

mkdir -p valheim && \
docker run --rm -v "$PWD/valheim:/data" gameservermanagers/steamcmd:latest \
  +force_install_dir /data +login anonymous +app_update 896660 validate +quit

Run with a different timezone:

docker run --rm -e TZ=UTC gameservermanagers/steamcmd:latest +login anonymous +quit

Data Persistence

Steam content is stored under /home/steam/Steam (owned by the non-root steam user). Mount a volume there to persist downloads across runs.

docker run -v steamcmd-data:/home/steam/Steam gameservermanagers/steamcmd:latest +login anonymous +quit

Configuration

Common tunables (all optional):

Option How Purpose
Timezone -e TZ=Europe/London Control tzdata (if installed)
Working dir -w /home/steam Override working directory
User mapping --user $(id -u):$(id -g) Run with host UID/GID (if perms needed)

Steam credentials (if you need a non-anonymous app):

docker run -it --rm gameservermanagers/steamcmd:latest +login <username> <password> +app_update <appid> +quit

Consider using Steam Guard / login tokens; avoid embedding secrets in shell history. Use --env-file for larger sets of env variables if needed.

Healthcheck

The image defines a HEALTHCHECK that periodically performs a minimal anonymous login and metadata refresh. To disable at runtime, you can override with --no-healthcheck (Docker 25+) or build your own image FROM this one and use HEALTHCHECK NONE.

Security Notes

  • Runs as non-root steam
  • Network access only to Steam endpoints during operations
  • Keep host Docker updated; image alone does not mitigate kernel CVEs

Contributing

Issues & PRs welcome. Before submitting:

  1. Run formatters: prettier --write .
  2. Run linters: super-linter workflow (or locally with the provided dev container)
  3. Keep layers minimal; squash RUN chains where reasonable

License

MIT – see LICENSE.


Looking for additional architectures or features? Open an issue to discuss multi-arch builds or tag deprecation timelines.

Troubleshooting

Empty output directory:

  • Ensure the order: +force_install_dir comes BEFORE +login (SteamCMD requirement – it warns otherwise). If reversed, files may go to the default Steam library inside the container instead of your mounted directory.
  • Verify permissions: the container runs as user steam (UID 1000). If your host user ID differs and you see permission errors, try adding --user $(id -u):$(id -g) or pre-chown the host directory.
  • Add validate only when necessary; it forces extra file checks and can slow installs.

Confirm installation path by adding +app_status <appid> before +quit to inspect state.