-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
64 lines (62 loc) · 1.78 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
version: "3"
services:
base:
image: roshumble:base
build:
context: .
dockerfile: docker/Dockerfile
args:
ROS_DISTRO: humble
target: base
# Inside docker file, FROM xxx AS base
# Interactive shell
stdin_open: true
tty: true
# Networking and IPC for ROS 2. To prevent creating a new IP address for each container
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
device_cgroup_rules:
- 'c *:* rmw'
environment:
- ROS_DOMAIN_ID
overlay:
extends: base
image: roshumble:overlay
build:
context: .
dockerfile: docker/Dockerfile
target: overlay
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
devel:
extends: base
image: roshumble:devel
command: /bin/bash
# This just launches shell. could put ros2 run ... in command instead. Need to figure out how to run multiple commands
# Maybe could instead run a launch file to run all these files? Look into it
# Could create multiple containers for each command as a solution
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
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
- /dev:/dev