-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (50 loc) · 1.57 KB
/
docker-compose.yml
File metadata and controls
56 lines (50 loc) · 1.57 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
###############################################################################
# docker-compose.yml – SAFE_ROS2 development container (ROS 2 Foxy)
#
# Usage:
# docker compose build
# docker compose up # start the container
# docker compose exec ros bash # open a shell inside the running container
#
# GUI (rviz2 / rqt):
# Run `xhost +local:docker` on the host before starting the container.
###############################################################################
services:
ros:
build:
context: .
dockerfile: Dockerfile
container_name: safe_ros2_foxy
stdin_open: true
tty: true
# --- Networking ---
network_mode: host
# --- Bluetooth / joystick pairing from inside the container ---
privileged: true
# --- GUI / X11 forwarding ---
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- ROS_DOMAIN_ID=0
- ROS_WS=/ros2_ws
volumes:
# X11 socket for GUI apps
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# Mount the src directory into the workspace
- ./src:/ros2_ws/src:rw
# CycloneDDS setup script
- ./setup_cyclone.sh:/ros2_ws/setup_cyclone.sh:ro
# Host dbus for bluetoothctl (PS4 controller pairing)
- /var/run/dbus:/var/run/dbus:rw
# Persist colcon build artifacts between runs
- ros2_build:/ros2_ws/build
- ros2_install:/ros2_ws/install
- ros2_log:/ros2_ws/log
# --- GPU + joystick passthrough ---
devices:
- /dev/dri:/dev/dri
- /dev/input:/dev/input
volumes:
ros2_build:
ros2_install:
ros2_log: