-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (44 loc) · 1.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (44 loc) · 1.33 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
# Docker Compose file for the ROS 2 commissioning environment.
# This setup uses a macvlan network to allow the container to communicate
# directly with the ctrlX CORE device on the local network.
services:
ros-container:
image: ${IMAGE_TAG_FINAL}
container_name: ${CONTAINER_NAME}
hostname: ${CONTAINER_NAME}
restart: "no"
networks:
ctrlx_bridge:
ctrlx_macvtap:
ipv4_address: ${CONTAINER_MACVLAN_IP}
# --- X11 Forwarding for GUI Applications (e.g., RViz) ---
devices:
- /dev/dri:/dev/dri
environment:
- DISPLAY=$DISPLAY
- QT_X11_NO_MITSHM=1
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# Note: You may need to configure xauth on your host for this to work.
# xhost +local:docker
- /tmp/.docker.xauth:/tmp/.docker.xauth:rw
# allow access to kernel clock services
cap_add:
- SYS_TIME
# allow container to be interactive
stdin_open: true
tty: true
networks:
# This accesses host's network, necessary for NTP
ctrlx_bridge:
name: ${CONTAINER_NAME}-bridge
driver: bridge
# This taps into the host's physical network interface.
ctrlx_macvtap:
driver: macvlan
name: ${CONTAINER_NAME}-macvtap
driver_opts:
parent: ${HOST_NETWORK_INTERFACE}
ipam:
config:
- subnet: 192.168.28.0/24