forked from ros-wg-delib/roscon24-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
62 lines (60 loc) · 2.03 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Docker Compose file for ROSCon 2024 Deliberation Workshop
#
# Usage:
#
# To build the images:
# docker compose build
#
# To run a specific service by name:
# docker compose run <service_name>
#
# To open an interactive shell to a running container:
# docker exec -it <container_name> bash
services:
base:
image: ghcr.io/ros-wg-delib/roscon_delib_ws_2024:latest
build:
context: .
dockerfile: .docker/Dockerfile
target: roscon_delib_ws_2024
# 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
# Needed to run Groot inside the container
privileged: true
environment:
# Ensure your ROS 2 system is only visible on the local network
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
# If you disable ROS_LOCALHOST_ONLY above, ensure you use a unique domain ID on your network
- ROS_DOMAIN_ID=0
# Allows graphical programs in the container
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
# Enables FlexBE web UI to work as root inside the container
- QTWEBENGINE_DISABLE_SANDBOX=1
volumes:
# Mount the workshop source code
- ./:/delib_ws/src/:rw
# Mount the colcon build artifacts
- .colcon/build/:/delib_ws/build/:rw
- .colcon/install/:/delib_ws/install/:rw
- .colcon/log/:/delib_ws/log/:rw
# Allows graphical programs in the container
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority
# Runs tests
# TODO: We want to test on workshop problems, but PyRoboSim tests will do for now.
test:
extends: base
command: >
bash -c "
python3 -m pytest /delib_ws/src/dependencies/pyrobosim/pyrobosim/test/core &&
colcon test --packages-select pyrobosim_ros --event-handlers console_cohesion+
"
profiles: [test]