GMod dedicated server in an Ubuntu 22 based docker container
- Dockerfile 54.6%
- Shell 45.4%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| Dockerfile | ||
| entrypoint.sh | ||
| LICENSE | ||
| mount.cfg | ||
| README.md | ||
| splash.txt | ||
GMod-Docker
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