1
1
version : " 3.9"
2
2
3
3
services :
4
-
4
+
5
+ # #########################################
6
+ # There's a lot going on in this file,
7
+ # it's normal to get lost with all the options and variables
8
+ #
9
+ # Before diving in, make sure to take a look at the documentation.
10
+ # in particular read the components-overview section (https://github.com/games-on-whales/gow/blob/master/docs/components-overview.md)
11
+ # in order to get a view on how the components are tied together
12
+ # ###################
13
+
14
+
15
+ # ###################
5
16
# If you don't have a desktop environment we have to run Xorg
6
17
xorg :
7
18
build : ./images/xorg/
8
19
image : gameonwhales/xorg
9
- network_mode : host
20
+ network_mode : host # Needed by uinput
10
21
privileged : true
11
22
volumes :
12
- # Shared with Sunshine in order to get mouse, joypad working
23
+ # Shared with Sunshine in order to get mouse and joypad working
13
24
- /dev/input:/dev/input:ro
14
25
- /run/udev:/run/udev:ro
15
- # - /dev/shm:/dev/shm TODO
26
+ # If you don't pass this it complains (but it runs anyway?) so probably it's not strictly needed
27
+ - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
16
28
# The xorg socket, it'll be populated when up and running
17
29
- xorg:/tmp/.X11-unix
30
+ ipc : shareable # Needed for MIT-SHM, removing this should cause a performance hit see https://github.com/jessfraz/dockerfiles/issues/359
18
31
environment :
19
32
DISPLAY : " :0"
20
33
34
+ # ###################
21
35
# If you don't have a pulse server start it
22
36
pulse :
23
37
depends_on :
@@ -36,6 +50,7 @@ services:
36
50
environment :
37
51
DISPLAY : " :0"
38
52
53
+ # ###################
39
54
sunshine :
40
55
depends_on :
41
56
- xorg
@@ -52,34 +67,44 @@ services:
52
67
- xorg:/tmp/.X11-unix
53
68
# Home directory: sunshine state + configs
54
69
- ${local_state}/:/home/retro/
70
+ ipc : service:xorg # Needed for MIT-SHM, removing this should cause a performance hit see https://github.com/jessfraz/dockerfiles/issues/359
55
71
environment :
56
72
DISPLAY : " :0"
57
73
LOG_LEVEL : info # Set to debug or verbose if you want to see more
58
74
# Using network in order to connect to pulse
59
75
# if you do have a pulse server already point this to the pulse socket like unix:/tmp/pulse-sock
60
76
# and mount the host socket to the instance
61
- PULSE_SERVER : 127.0.0.1
62
-
77
+ PULSE_SERVER : 127.0.0.1
78
+
79
+
80
+ # ###################
63
81
retroarch :
64
82
depends_on :
65
83
- xorg
66
84
- pulse
67
85
- sunshine
68
86
build : ./images/retroarch/
69
87
image : gameonwhales/retroarch
88
+ network_mode : host
89
+ privileged : true
70
90
volumes :
91
+ # Followings are needed in order to get joystick support
92
+ - /dev/input:/dev/input:ro
93
+ - /run/udev:/run/udev:ro
94
+ - /dev/uinput:/dev/uinput:ro
71
95
# Xorg socket in order to get the screen
72
96
- xorg:/tmp/.X11-unix
73
97
# Home directory: retroarch games, downloads, cores etc
74
98
- ${local_state}/:/home/retro/
99
+ ipc : service:xorg # Needed for MIT-SHM, removing this should cause a performance hit see https://github.com/jessfraz/dockerfiles/issues/359
75
100
environment :
76
101
DISPLAY : " :0"
77
- LOG_LEVEL : info # Set to debug or verbose if you want to see more
78
102
# Using network in order to connect to pulse
79
103
# if you do have a pulse server already point this to the pulse socket like unix:/tmp/pulse-sock
80
104
# and mount the host socket to the instance
81
- PULSE_SERVER : pulse
105
+ PULSE_SERVER : 127.0.0.1
82
106
107
+ # ####################
83
108
# An example of running an unprivileged X11 app in this environment
84
109
# firefox:
85
110
# depends_on:
@@ -98,6 +123,6 @@ services:
98
123
# PULSE_SERVER: pulse # The name of the pulse container is the hostname in the virtual network
99
124
100
125
101
-
126
+ # ###################
102
127
volumes :
103
128
xorg : # This will hold the xorg socket file and it'll be shared between containers
0 commit comments