devices:# all devices you may need inside the docker container (for instance I needed a joystick here)
- /dev/input/js0:/dev/input/js0# mapping in docker is always host_path:container_path
# Overlay image containing the extended project packages. For instance Mapping, Navigation which may run on a separate PC, so I divided that from the base image.
overlay:
extends:base# this means you take the base image as reference and run your service on top of that
image:ghcr.io/bjoernellens1/ros2_rmp/rmp:overlay
build:
context:.
dockerfile:docker/Dockerfile
tags:
- ghcr.io/bjoernellens1/ros2_rmp/rmp:overlay
target:overlay
x-bake:
platforms:
#- linux/arm64 uncomment if arm64 platform is needed (like jetson nano or raspberry pi)
- linux/amd64
volumes:
- .:/repo
command:>
/bin/bash
# Additional dependencies for GUI applications: For my configuration, this last (biggest size) image will house the additional GUI tools like rviz2, gazebo, etc. This comes last as this extends the previous images. Won't be needed running on the robot. More suited for visualization, analysis or control on a separate PC.
guis:
extends:overlay
image:ghcr.io/bjoernellens1/ros2_rmp/rmp:guis
build:
context:.
dockerfile:docker/Dockerfile
tags:
- ghcr.io/bjoernellens1/ros2_rmp/rmp:guis
target:guis
x-bake:
platforms:
#- linux/arm64 uncomment if arm64 platform is needed (like jetson nano or raspberry pi)
- linux/amd64
#entrypoint: /bin/bash
command:>
/bin/bash
# The following service definitions do not include build instructions as they do not require additional content in the images. Meaning, if you already have the image locally, everything's fine. If you don't have the image locally, docker compose will download the image from the image registry for you. If docker compose does not have access to the image registry, it will build the corresponding image for you (so better make sur you have access).
# You can see these service definitions as an easy way to spin up separate containers for launching separate tasks. I use this to control the current operational mode of the robot (mapping or navigation an localization). In the end it's just spinning up launch files in separate containers.