Skip to main content

Interactive CLI wizard for generating ROS2 Docker environments

Project description

🤖 ros2-dockergen

One command. Interactive. Zero fuss.
Generate production-ready Dockerfile + docker-compose.yml + README.md for any ROS2 project — straight from your terminal.


✨ Features

  • Supports Jazzy, Humble, Kilted ROS2 distributions
  • Chooses the right base image (ros:, osrf/ros:, or nvidia/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.yml with 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 items
  • a — 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


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

ros2_dockergen-1.0.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ros2_dockergen-1.0.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

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

Hashes for ros2_dockergen-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5660930e5b54ce4e2c064709c1006e4fddaff5a9023b5d879347bed0f9803427
MD5 8455bb0b072bbe72d2d35b41ed4f24c7
BLAKE2b-256 ea20fa872001ca23a3dc344141fa8f2bfd22e9685a5484e6ad45d261c25fa568

See more details on using hashes here.

Provenance

The following attestation bundles were made for ros2_dockergen-1.0.0.tar.gz:

Publisher: publish.yml on ppswaroopa/ros2-dockergen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ros2_dockergen-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c4fc5a7fd35e34382e9ae7b8075d9e2a4d686dc30582f226ab7bf1290176210
MD5 b5e323a5cb01efef18e4fd8dc19b6045
BLAKE2b-256 32d51f9a637d1025f76207430619eaeee5e900263f8855aa73a9144c46d945c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ros2_dockergen-1.0.0-py3-none-any.whl:

Publisher: publish.yml on ppswaroopa/ros2-dockergen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page