-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
62 lines (60 loc) · 1.6 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
62 lines (60 loc) · 1.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
# Docker Compose file for TurtleBot3 Behavior Examples
#
# Usage:
#
# To build the images:
# docker compose build
#
# To start up a specific service by name:
# docker compose up <service_name>
#
# To open an interactive shell to a running container:
# docker exec -it <container_name> bash
services:
# Base image containing dependencies.
base:
image: ros_base
build:
context: .
dockerfile: 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
# Needed to display graphical applications
privileged: True
environment:
# Allows graphical programs in the container.
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- NVIDIA_DRIVER_CAPABILITIES=all
volumes:
# Allows graphical programs in the container.
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
# Developer container
dev:
extends: base
image: dev
build:
context: .
dockerfile: Dockerfile
target: dev
args:
- UID=${UID:-1000}
- GID=${UID:-1000}
- USERNAME=${USERNAME:-devuser}
# volumes:
# # Can mount the source code like:
# - ./tb3_autonomy:/overlay_ws/src/tb3_autonomy:rw
# # Mount colcon build artifacts for faster rebuilds
# - ./.colcon/build/:/overlay_ws/build/:rw
# - ./.colcon/install/:/overlay_ws/install/:rw
# - ./.colcon/log/:/overlay_ws/log/:rw
user: ${USERNAME:-devuser}
command: sleep infinity