A Python-based CLI tool to generate Docker environments for various ROS (Robot Operating System) distributions.
Easily create and configure containerized ROS environments with customizable settings.
Ensure you have the following installed and configured:
- Docker
- NVIDIA Container Toolkit (required if using NVIDIA GPU)
- uv (optional and recommended)
git clone https://github.com/xiaosq2000/ros-docker.git
cd ros-dockerNote
If uv unavailable:
- You need install first
python -m venv .venv source .venv/bin/activate pip install .
- Replace
uv run ros-dockerwithpython -m ros-docker.mainin all following commands
To see all available ROS distributions that can be generated:
uv run ros-docker listTake ROS1 Noetic as an example.
Generate Docker files for a specific ROS distribution:
uv run ros-docker generate noeticTip
- Preview the generated files without saving them:
uv run ros-docker generate noetic --preview
- Specify a custom output directory (default: './generated'):
uv run ros-docker generate noetic --output-dir ./generated/noetic
cd generated
docker compose -f docker-compose.noetic.yml up --build -ddocker exec -it ros-noetic-container bashYou can customize the Docker environment by editing the YAML configuration files in the configs directory. Each ROS distribution has its own configuration file, e.g., configs/ros_noetic.yaml.
The tool supports creating development environments with custom tooling and configurations through development profiles.
Create your own development profiles by adding YAML files to the configs/dev_profiles/ directory.
uv run ros-docker list-profiles
uv run ros-docker generate-dev <ros-distro> --profile <your-profile>