-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
executable file
·46 lines (44 loc) · 1.4 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
# Support launching the development container
services:
develop-base:
build:
context: .
dockerfile: Dockerfile
target: ros-develop
args:
- USERNAME=${USERNAME:-dev}
- USER_UID=${USER_UID:-501}
- USER_GID=${USER_GID:-501}
- ROS_DISTRO=${ROS_DISTRO:-iron}
# Ensures signals are actually passed and reaped in the container for shutdowns.
# https://docs.docker.com/compose/compose-file/compose-file-v3/#init
init: true
# Interactive shell
stdin_open: true
tty: true
# Networking and IPC for ROS 2
network_mode: host
ipc: host
volumes:
- ${ROS_WORKSPACE:-/dev/null}:/home/${USERNAME:-dev}/ws
- ${HOME}/.ccache/:/home/${USERNAME:-dev}/.ccache:rw
dev:
extends: develop-base
container_name: ${ROS_WORKSPACE_NAME:-ros}-develop-container
environment:
- DISPLAY
- QT_X11_NO_MITSHM=1
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:ro
command: sleep infinity
dev-mac:
extends: develop-base
container_name: ${ROS_WORKSPACE_NAME:-ros}-develop-container-mac
# Allows graphical programs in the container.
# NOTE: Gazebo is still broken on native macos :(, but this seems to work with Qt and RViz
environment:
- DISPLAY=host.docker.internal:0
- QT_X11_NO_MITSHM=1
volumes:
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
command: sleep infinity