It should be noted that links to the osrf/ros2 Docker hub repo (hosting ROS developer images, for nightly or from scratch builds), and not the Official Library repo for ROS on DockerHub (hosting ROS user images, for building with released binaries).

https://hub.docker.com/_/ros

Regardless of what base image you use, if you’d like to keep projects isolated on a dev machine, but are using GUI software and Linux, rocker CLI could also help you there: