0% found this document useful (0 votes)
7 views2 pages

Docker Compose Yaml

Uploaded by

FrNuDN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Docker Compose Yaml

Uploaded by

FrNuDN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

/home/omar/march/.docker_local/docker-compose.

yaml

version: "3.9"
# This docker-compose file is to start up ros2 with gui support.
# For more information on how:
# • to use it: checkout
https://docs.projectmarch.nl/doc/getting_started/setting_up_docker.html
# • this file is made: checkout
https://docs.docker.com/compose/compose-file/compose-file-v3/
# • the gui is setup: http://wiki.ros.org/docker/Tutorials/GUI
# date: 02-12-2021
# author: George Vegelien

# This is the default service for giving the containers gui privileges.
# It is added to the other services with pointers by calling '<< : *gui-standard'.
Keep in mind that if
# the pointer is added to any service that already specifies an environment, then
this environment is overwritten.
x-gui:
&gui-standard
tty: true # Enables terminal in & out
stdin_open: true
user: "${M_UID}:${M_GID}" # These two values are set by alias 'set_uid_gid' and
their values are usually both 1000
environment:
- USER=${USER}
- DISPLAY=${DISPLAY}
volumes:
# This makes the container mount your home directory.
- /home/$USER:/home/$USER:rw
# The volumes mounted here below are added to enable the same user/local
account in the container.
- /etc/group:/etc/group:ro
- /etc/passwd:/etc/passwd:ro
- /etc/shadow:/etc/shadow:ro
- /etc/sudoers.d:/etc/sudoers.d:ro
# This makes sure that the docker container can use your gui.
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# (see https://docs.projectmarch.nl/doc/getting_started/setting_up_docker.html
for more information)
deploy: # To cap cpu at 90% usage.
resources:
limits:
cpus: '${MARCH_DOCKER_CPU_CAP}'

services:
ros2-service:
<< : *gui-standard
container_name: ros2
image: ros2
environment:
- USER=${USER}
- DISPLAY=${DISPLAY}
- ROS_DOCKER_TYPE="ros2"
- ROS_DOCKER_START_TYPE=${ROS_DOCKER_START_TYPE}
- ROS_ARGS
- ROS2_ARGS
working_dir: /home/${USER}/march/ros2
ipc: host
command: ["bash", "${HOME}/march/.docker_local/start_scripts/$
{ROS_DOCKER_START_TYPE:-bash}/ros2.bash"]

You might also like