GitHunt
2C

2chevskii/steamcmd-docker

SteamCMD Docker image to automate development related to Steam apps

SteamCMD Docker Docker Image Version GitHub Actions Workflow Status

Docker image with SteamCMD utility, which allows you to automate builds of dedicated servers, games and other stuff

Using as base image

FROM 2chevskii/steamcmd:latest

# Invoke SteamCMD to install CS2 dedicated server
# into /cs2_ds directory
RUN ./steamcmd.sh +force_install_dir /cs2_ds +login anonymous +app_update 730 validate +quit

# Run your server
EXPOSE 27015/tcp
EXPOSE 27015/udp

WORKDIR /cs2_ds

ENTRYPOINT ["./cs2", "-dedicated", "+map", "de_dust2"]

Automating using SteamCMD scripts

On start, this image passes any file found under /docker-entrypoint.d to the SteamCMD using +runscript directive

Below you see an example of installing CS2 dedicated server using mounted script file

Notice the 'quit' instructions both at the and of the script
and passed as a docker run argument

This is important because by default this image starts in an interactive mode

00-install-cs2-ds.txt

@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
force_install_dir /cs2_ds
login anonymous
app_update 730 validate
quit

Shell

docker run -it -v ./00-install-cs2-ds.txt:/docker-entrypoint.d/00-install-cs2-ds.txt 2chevskii/steamcmd:latest +quit

Languages

Dockerfile59.4%Shell40.6%

Contributors

MIT License
Created May 6, 2025
Updated May 14, 2025
2chevskii/steamcmd-docker | GitHunt