Repository navigation
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
96 lines (87 loc) · 4.6 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
96 lines (87 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Example compose file. Copy to docker-compose.yml and replace every <...>
# placeholder. Two networking options are shown; enable exactly ONE.
#
# Steam finds other PCs by broadcasting on UDP 27031-27036, then sends Local
# Network Game Transfers on TCP 27040. Docker's default bridge (NAT) does not
# carry those broadcasts, so other PCs never see this container. macvlan
# (option A) puts the container on the LAN as its own host. Host networking
# (option B) uses the Docker host's own address for the same ports.
services:
steam-gui:
image: ghcr.io/pat-e/steam-gui-docker:latest # or steam-gui:local if you used ./build.sh
container_name: steam-gui
# Name other Steam clients on your LAN show for this machine (e.g. in
# 'Managing downloads for' and the download queue). Without it, Docker uses
# a random container ID like 3f2a9c1b7d4e. 'docker' makes it obvious which
# client is the Steam container. NOTE: ignored with network_mode: host,
# where the container uses the host's own hostname.
hostname: docker
restart: unless-stopped
environment:
USER_ID: "1000" # owner of /config and the game library on the host
GROUP_ID: "1000"
TZ: "Etc/UTC" # e.g. Europe/Berlin
KEEP_APP_RUNNING: "1" # restart Steam if it exits or crashes
DISPLAY_WIDTH: "1600"
DISPLAY_HEIGHT: "900"
# Optional: register library folders (container paths, comma-separated)
# automatically before Steam starts. Leave unset to manage libraries in
# Steam's own UI (Settings > Storage).
# STEAM_LIBRARY_PATHS: "/mnt/games"
# Optional: GPU mode, see the "Optional: GPU" block below.
# SUP_GROUP_IDS: "<render-gid>"
# STEAM_GPU: "auto" # auto (default) | on | off
# Optional: protect the VNC / web UI (see the jlesage baseimage docs).
# VNC_PASSWORD: "<choose-a-password>"
volumes:
# Steam client, login session and settings. Keep this on fast local disk.
- </path/to/appdata/steam-gui>:/config
# Game library (local disk or network share). Example:
# - /path/to/games:/mnt/games
- </path/to/games>:/mnt/games
# Steam's embedded browser (CEF) uses /dev/shm; Docker's 64 MB default
# can make the UI crash.
shm_size: "512m"
# ---- Privileges ----------------------------------------------------------
# Current Steam starts its UI process (steamwebhelper) inside Valve's
# "sniper" runtime container via bubblewrap, which needs unprivileged user
# namespaces. Docker's default seccomp profile blocks those, and on
# AppArmor hosts (Debian/Ubuntu) the docker-default profile denies the
# mounts bubblewrap makes. Expected minimum (see README "Privileges"):
security_opt:
- seccomp:unconfined
- apparmor:unconfined # only matters on hosts with AppArmor enabled
# NOT needed for this image: cap_add SYS_ADMIN, privileged, /dev/fuse.
# ---- Optional: GPU (AMD/Intel, open-source drivers) ----------------------
# Without these lines the image uses software rendering, which is fine for
# a download cache. To use the iGPU/GPU for the UI instead:
# devices:
# - /dev/dri:/dev/dri
# and add to `environment:` the host's render group id
# (`getent group render | cut -d: -f3` on the host):
# SUP_GROUP_IDS: "<render-gid>"
# ---- Option A: macvlan (container gets its own LAN IP) -----------------
# UDP 27031-27036 and TCP 27040 are then the container's, at 192.168.0.50,
# the same way they would be on a PC. Other Steam clients can discover it.
networks:
lan:
ipv4_address: <192.168.0.50> # a free, static IP on your LAN (outside DHCP range)
# Web UI: http://192.168.0.50:5800 VNC: 192.168.0.50:5900
# No `ports:` needed (and none possible) with macvlan.
# ---- Option B: host networking ------------------------------------------
# Same discovery ports (UDP 27031-27036) and transfer port (TCP 27040),
# but on the Docker host's own LAN address instead of a separate one.
# Remove the `networks:` block above (and at the bottom) and use:
# network_mode: host
# Web UI: http://192.168.0.10:5800 VNC: 192.168.0.10:5900
# Make sure nothing else on the host uses 5800/5900, UDP 27031-27036, or TCP 27040.
networks:
lan:
driver: macvlan
driver_opts:
parent: <eth0> # host NIC that is attached to your LAN
ipam:
config:
- subnet: <192.168.0.0/24> # your LAN subnet
gateway: <192.168.0.1> # your router
# ip_range: <192.168.0.48/29> # optional: range Docker may assign from