GMod dedicated server in an Ubuntu 22 based docker container
| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.version=22.04 |
| ADD file:da2cd86408d9354e8bd817c8a4b8635a1d788cd20d0d70061ce02a173e8cf902 in / |
| CMD ["/bin/bash"] |
| ENV USER=root |
| ENV HOME=/root |
| WORKDIR /root |
| SHELL [/bin/bash -o pipefail -c] |
| RUN /bin/bash -o pipefail -c echo steam steam/question select "I AGREE" | debconf-set-selections && echo steam steam/license note '' | debconf-set-selections # buildkit |
| ARG DEBIAN_FRONTEND=noninteractive |
| RUN |1 DEBIAN_FRONTEND=noninteractive /bin/bash -o pipefail -c dpkg --add-architecture i386 && apt-get update -y && apt-get install -y --no-install-recommends ca-certificates locales steamcmd && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |1 DEBIAN_FRONTEND=noninteractive /bin/bash -o pipefail -c locale-gen en_US.UTF-8 # buildkit |
| ENV LANG=en_US.UTF-8 |
| ENV LANGUAGE=en_US:en |
| RUN |1 DEBIAN_FRONTEND=noninteractive /bin/bash -o pipefail -c ln -s /usr/games/steamcmd /usr/bin/steamcmd # buildkit |
| RUN |1 DEBIAN_FRONTEND=noninteractive /bin/bash -o pipefail -c steamcmd +quit # buildkit |
| RUN |1 DEBIAN_FRONTEND=noninteractive /bin/bash -o pipefail -c mkdir -p $HOME/.steam && ln -s $HOME/.local/share/Steam/steamcmd/linux32 $HOME/.steam/sdk32 && ln -s $HOME/.local/share/Steam/steamcmd/linux64 $HOME/.steam/sdk64 && ln -s $HOME/.steam/sdk32/steamclient.so $HOME/.steam/sdk32/steamservice.so && ln -s $HOME/.steam/sdk64/steamclient.so $HOME/.steam/sdk64/steamservice.so # buildkit |
| ENTRYPOINT ["steamcmd"] |
| CMD ["+help" "+quit"] |
| ENV HOME=/home/gmod |
| ENV REPLACE_MOUNT_CONFIG=true |
| ENV MAX_PLAYERS=32 |
| ENV GAME_MODE=sandbox |
| ENV MAP=gm_construct |
| ENV WORKSHOP_COLLECTION= |
| ENV ARGS= |
| EXPOSE [27015/tcp 27015/udp] |
| WORKDIR /server |
| RUN /bin/bash -o pipefail -c useradd -m gmod # buildkit |
| RUN /bin/bash -o pipefail -c apt update && apt install --no-install-recommends --no-install-suggests -y sudo iproute2 && apt clean && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/bash -o pipefail -c mkdir /mount && chown gmod:gmod /mount /server # buildkit |
| COPY --chown=gmod:gmod --chmod=755 entrypoint.sh splash.txt mount.cfg / # buildkit |
| RUN /bin/bash -o pipefail -c mkdir ${HOME}/.steam && chown -R gmod:gmod ${HOME}/.steam && chmod -R 777 ${HOME} # buildkit |
| USER gmod |
| VOLUME [/server /mount] |
| HEALTHCHECK {Test:[CMD-SHELL if [ $(ss -l | grep -c LISTEN.*27015) == "0" ] ; then exit 1; fi] Interval:10s Timeout:0s StartPeriod:30s StartInterval:0s Retries:3} |
| ENTRYPOINT ["/entrypoint.sh"] |
| Key |
Value |
| org.opencontainers.image.created |
2026-07-01T00:01:30.391Z |
| org.opencontainers.image.description |
GMod dedicated server in an Ubuntu 22 based docker container |
| org.opencontainers.image.licenses |
|
| org.opencontainers.image.revision |
229e1083146ed3dc3d228905db108f5e5a0e06df |
| org.opencontainers.image.source |
https://code.ggrainger.uk/ggrainger/GMod-Docker |
| org.opencontainers.image.title |
GMod-Docker |
| org.opencontainers.image.url |
https://code.ggrainger.uk/ggrainger/GMod-Docker |
| org.opencontainers.image.version |
latest |