-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
66 lines (63 loc) · 1.63 KB
/
docker-compose.yaml
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
version: "3"
services:
base:
image: inspection_eoat:base
build:
context: .
dockerfile: docker/Dockerfile
args:
ROS_DISTRO: humble
target: base
# Interactive shell
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
pid: host
# Needed to access devices and display graphical applications
privileged: true
volumes:
# Allows graphical programs in the container.
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
# Allow access to host devices
- /dev:/dev
- ./Parts:/root/Inspection/Parts
- ./Lights:/root/Inspection/Lights
device_cgroup_rules:
- 'c *:* rmw'
# Overlay image containing the example source code.
overlay:
extends: base
image: inspection_eoat:overlay
build:
context: .
dockerfile: docker/Dockerfile
target: overlay
# Dev container
devel:
extends: base
image: inspection_eoat:devel
command: ros2 run inspection_gui gui
build:
context: .
dockerfile: docker/Dockerfile
target: devel
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
- ./inspection_gui:/overlay_ws/src/inspection_gui
# Test container
gui:
extends: overlay
command: ros2 run inspection_gui gui
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw