Skip to content

multistage

This is an example of a multi-stage Dockerfile that produces a runtime image with custom-built targets.

Quick start

Build

make

Clean up

rm -rf src
docker rmi althack/ros2:crystal-example

Step-by-step

Set up your workspace

Run the setup script directly, or let make invoke it as part of the build:

./get_code.sh

The equivalent manual commands are:

mkdir -p src
cp .rosinstall src/.rosinstall
wstool up -t src

Build the dockerfile

docker build -f Dockerfile -t althack/ros2:crystal-example .