-
Notifications
You must be signed in to change notification settings - Fork 3
/
compose.yaml
52 lines (52 loc) · 1.96 KB
/
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
services:
husky-ws:
build:
context: .
dockerfile: Dockerfile
# Specify the target platform to build the image.
# Reference: https://docs.docker.com/compose/compose-file/build/#platforms
# platforms:
# - "linux/arm64"
image: j3soon/ros2-husky-ws
container_name: ros2-husky-ws
stdin_open: true
tty: true
privileged: true
command: /bin/bash
network_mode: host
working_dir: /home/ros2-agv-essentials/husky_ws
environment:
- DISPLAY=${DISPLAY}
# Set ros2 environment variables.
# References:
# - https://docs.ros.org/en/humble/Concepts/Intermediate/About-Domain-ID.html
# - https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html
# - https://docs.ros.org/en/humble/Tutorials/Demos/Logging-and-logger-configuration.html#console-output-colorizing
# - ROS_LOCALHOST_ONLY=1
- ROS_DOMAIN_ID=42
- ROS2_WS=/home/ros2-agv-essentials/husky_ws
- RCUTILS_COLORIZED_OUTPUT=1
# If you want to access GPU, please uncomment the lines below.
# Reference : https://docs.docker.com/compose/gpu-support/
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [ gpu ]
volumes:
# Mount local timezone into container. ( Readonly )
# Reference: https://stackoverflow.com/questions/57607381/how-do-i-change-timezone-in-a-docker-container
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# Mount X11 server
- /tmp/.X11-unix:/tmp/.X11-unix
- $HOME/.Xauthority:/home/user/.Xauthority
# Mount devices
- /dev:/dev
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
- ./cache/.gazebo:/home/user/.gazebo
# Mount workspace
- ../..:/home/ros2-agv-essentials