GMod dedicated server in an Ubuntu 22 based docker container
  • Dockerfile 54.6%
  • Shell 45.4%
Find a file
ggrainger 229e108314
All checks were successful
Docker Image CI / build (push) Successful in 34s
Add build status to README
2026-06-03 21:55:00 +00:00
.forgejo/workflows Update .forgejo/workflows/docker-image-ci.yml 2026-06-01 21:51:06 +00:00
Dockerfile Add env var for replacing mount.cg 2023-07-01 12:27:36 +01:00
entrypoint.sh Add env var for replacing mount.cg 2023-07-01 12:27:36 +01:00
LICENSE Initial commit 2022-03-23 21:03:07 +00:00
mount.cfg Switch to using existing steamcmd image 2023-03-03 22:18:47 +00:00
README.md Add build status to README 2026-06-03 21:55:00 +00:00
splash.txt Switch to using existing steamcmd image 2023-03-03 22:18:47 +00:00

GMod-Docker

Build Status

GMod dedicated server in an Ubuntu 22 Docker container.
Includes css content and auto update's on restart

This is a rootless container, by default it runs as user 1000:1000 but this can be changed using the docker user option

Based on the steamcmd Docker image

File structure

The file structure within the container is as follows:

📁mount/
├─ 📁css
|  ├─ CSS content
📁server/
├─ Server files here

Environment variables

Provides the following environment variables for configuration:

Variable Default value Description
REPLACE_MOUNT_CONFIG true Controls whether the mount.cfg file is replaced automatically on startup, set to any other value to disable
MAX_PLAYERS 32 Max players to allow
GAME_MODE sandbox Game mode to host
MAP gm_construct Map to host
WORKSHOP_COLLECTION Workshop collection to host, should be an ID like 2036327578
ARGS Any further arguments to pass

Running

Docker CLI

docker run \
    -p 27015:27015 \
    -p 27015:27015/udp \
    -v gmod-server:/server \
    -v gmod-mount:/mount \
    code.ggrainger.uk/ggrainger/gmod-docker

Docker Compose

version: "3"
services:
    steamcmd:
        user: 1100:1100
        image: code.ggrainger.uk/ggrainger/gmod-docker
        ports:
            - 27015:27015
            - 27015:27015/udp
        volumes:
            - ./server:/server
            - ./mount:/mount