Multi-Container ROS 2 Images and Build Caching: Lessons from Autoware

A concept guide to splitting a large ROS 2 stack into dev and runtime containers and making CI builds fast with registry cache, compiler cache and a dependency-only rosdep stage.

In this article

  • Why one image stops working
  • Split by function, then by purpose
  • The results they reported
  • Technique 1: make the layer cache survive CI
  • Technique 2: cache the compiler, not just the layers
  • Technique 3: stop rosdep from rerunning for no reason
  • Technique 4: build in /opt, copy only the result
  • Where this was heading
  • Our take: where this fits
  • Checklist for your own stack
  • Further reading