-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdocker-compose.yml
39 lines (38 loc) · 1.17 KB
/
docker-compose.yml
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
version: "3.9"
services:
ros2_docker:
build:
context: ..
dockerfile: docker/Dockerfile
target: dev
args:
- AMENT_WORKSPACE_DIR=${AMENT_WORKSPACE_DIR}
- USERNAME=${USERNAME:-developer}
- UID=${UID}
- GID=${GID}
container_name: ros2_docker
environment:
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID}
# Limit ROS communication to local computer only
#- ROS_LOCALHOST_ONLY=1
- YOUR_IP=${YOUR_IP}
- ROBOT_IP=${ROBOT_IP}
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
# Configure Cyclone with a custom configuration using the IPs above
#- CYCLONEDDS_URI=${AMENT_WORKSPACE_DIR}/dds/cyclone.xml
extra_hosts:
- "${ROBOT_HOSTNAME}:${ROBOT_IP}"
# Required for communicating over the network
network_mode: "host"
# Required for accessing hardware
#privileged: true
tty: true
volumes:
# Required for accessing hardware
#- /dev:/dev
# Required for accessing storage media
#- /media:/media
- ../src:${AMENT_WORKSPACE_DIR}/src
- ../dds:${AMENT_WORKSPACE_DIR}/dds
# Required for ROS 2 shared memory communication
#- /dev/shm:/dev/shm