Interactive CLI wizard for generating ROS2 Docker environments
Project description
🤖 ros2-dockergen
One command. Interactive. Zero fuss.
Generate production-readyDockerfile+docker-compose.yml+README.mdfor any ROS2 project — straight from your terminal.
✨ Features
- Supports Jazzy, Humble, Kilted ROS2 distributions
- Chooses the right base image (
ros:,osrf/ros:, ornvidia/cuda:) - Configures ROS2 packages: Nav2, MoveIt2, SLAM Toolbox, RViz2, TurtleBot3, PCL, cv_bridge, CycloneDDS, ROSBridge, Gazebo, gz-sim, TensorRT, CUDA…
- Configures dev tools: colcon, rosdep, cmake, git, tmux, gdb, zsh + Oh-My-Zsh, X11, SSH, net-tools…
- Handles non-root users with UID/GID mapping
- Emits a matching
docker-compose.ymlwith GPU / X11 / SSH support - Prints a README.md with your exact next steps
- No external dependencies — requires only Python 3.10+, which ships on Ubuntu 22.04 and 24.04
📦 Install
Requirements
| Requirement | Version |
|---|---|
| Ubuntu | 22.04+ (or any Linux with Python 3.10+) |
| Python | ≥ 3.10 |
Option A — One-line installer (recommended)
curl -fsSL https://raw.githubusercontent.com/ppswaroopa/ros2-dockergen/main/install.sh | bash
The script will check for Python 3.10+ and install the package globally using pip.
Option B — Install via pip (from source)
git clone https://github.com/ppswaroopa/ros2-dockergen.git
cd ros2-dockergen
pip install .
Option C — Run directly without installing
git clone https://github.com/ppswaroopa/ros2-dockergen.git
cd ros2-dockergen
export PYTHONPATH=$PYTHONPATH:$(pwd)/src
python3 -m ros2_dockergen
🚀 Usage
ros2-dockergen # start the interactive wizard
ros2-dockergen --help # show help
ros2-dockergen --version # show version
The wizard walks you through 8 steps:
| Step | Prompt |
|---|---|
| 1 | ROS2 distro (Jazzy / Humble / Kilted) |
| 2 | Base image variant (ros-core / ros-base / desktop / desktop-full) |
| 3 | ROS2 packages to include |
| 4 | Dev tools to include |
| 5 | User type (non-root recommended) |
| 6 | Username & UID |
| 7 | Workspace path & container name |
| 8 | Output directory |
Then writes three files:
./your-container-name/
├── Dockerfile
├── docker-compose.yml
└── README.md
Navigation:
- Type a number and press Enter to select
1,3,5— select multiple itemsa— select all,n— select none- Enter — keep the shown default
q— quit at any prompt (no files written)
📁 Project structure
- `pyproject.toml`: Modern Python package configuration.
- `src/ros2_dockergen/`: Core Python package (logic + bundled config).
- `src/core.js`: Web-compatible core logic in JavaScript.
- `bin/`: CLI scripts and legacy entry points.
- `tests/`: Parity and validation suite.
- `.github/workflows/`: Automated CI pipeline.
- `index.html`: Webpage to generate Dockerfiles.
How it works
The single source of truth for all ROS2 metadata lives in src/ros2_dockergen/data/config.json. The Python CLI and Web UI both consume this config to ensure identical output. For the Python side, this config is bundled as a package resource.
Running the parity tests
# Requires both Python 3 and Node.js to be installed
python3 tests/test_parity.py
This runs 6 fixture configurations through both core.py and core.js and
asserts byte-for-byte identical output. Run it any time you edit config.json
or either renderer.
🔗 Related
- ROS 2 Docker Generator Web UI — Interactive browser-based version.
- OSRF ROS Docker images
- ROS2 documentation
License
Released under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ros2_dockergen-1.0.0.tar.gz.
File metadata
- Download URL: ros2_dockergen-1.0.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5660930e5b54ce4e2c064709c1006e4fddaff5a9023b5d879347bed0f9803427
|
|
| MD5 |
8455bb0b072bbe72d2d35b41ed4f24c7
|
|
| BLAKE2b-256 |
ea20fa872001ca23a3dc344141fa8f2bfd22e9685a5484e6ad45d261c25fa568
|
Provenance
The following attestation bundles were made for ros2_dockergen-1.0.0.tar.gz:
Publisher:
publish.yml on ppswaroopa/ros2-dockergen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_dockergen-1.0.0.tar.gz -
Subject digest:
5660930e5b54ce4e2c064709c1006e4fddaff5a9023b5d879347bed0f9803427 - Sigstore transparency entry: 1154533155
- Sigstore integration time:
-
Permalink:
ppswaroopa/ros2-dockergen@55f7ebfd9ad05d2461bd9d1638530cb53b0fc99e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ppswaroopa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55f7ebfd9ad05d2461bd9d1638530cb53b0fc99e -
Trigger Event:
push
-
Statement type:
File details
Details for the file ros2_dockergen-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ros2_dockergen-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c4fc5a7fd35e34382e9ae7b8075d9e2a4d686dc30582f226ab7bf1290176210
|
|
| MD5 |
b5e323a5cb01efef18e4fd8dc19b6045
|
|
| BLAKE2b-256 |
32d51f9a637d1025f76207430619eaeee5e900263f8855aa73a9144c46d945c3
|
Provenance
The following attestation bundles were made for ros2_dockergen-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on ppswaroopa/ros2-dockergen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ros2_dockergen-1.0.0-py3-none-any.whl -
Subject digest:
3c4fc5a7fd35e34382e9ae7b8075d9e2a4d686dc30582f226ab7bf1290176210 - Sigstore transparency entry: 1154533156
- Sigstore integration time:
-
Permalink:
ppswaroopa/ros2-dockergen@55f7ebfd9ad05d2461bd9d1638530cb53b0fc99e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ppswaroopa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55f7ebfd9ad05d2461bd9d1638530cb53b0fc99e -
Trigger Event:
push
-
Statement type: