# 🤖 ros2-dockergen

CI Publish to PyPI PyPI version License: MIT Python 3.10+ Web UI


ROS2 DockerGen Flow


> **One command. Interactive. Zero fuss.** > Generate production-ready `Dockerfile` + `docker-compose.yml` + `README.md` for any ROS2 project — straight from your terminal or on the [webpage](https://ppswaroopa.github.io/ros2-dockergen/) here --- ## Quick Install ### From PyPI (Recommended) ```bash pip install ros2-dockergen ``` ### One-line installer (Bash) ```bash curl -fsSL https://raw.githubusercontent.com/ppswaroopa/ros2-dockergen/main/install.sh | bash ``` --- ## Features - **Full Distribution Support**: Choose between **Jazzy**, **Humble**, and **Kilted** ROS2 distros. - **GPU Acceleration**: Automatically configures `nvidia/cuda` base images and runtime capabilities if CUDA or TensorRT is selected. - **User Choice**: Handles **non-root user** creation with automatic UID/GID mapping to prevent host volume permission headaches. - **Comprehensive Tooling**: Toggle common ROS2 packages (Nav2, MoveIt2, SLAM Toolbox, MoveIt, Gazebo GZ, etc.) and dev tools (colcon, rosdep, Oh-My-Zsh, SSH, X11). - **Complete Output**: Generates not just a `Dockerfile`, but also a matching `docker-compose.yml` and a workspace-specific `README.md` with instructions. - **Web Parity**: Identical logic engine shared with the [Web UI](https://ppswaroopa.github.io/ros2-dockergen/). --- ## Usage Simply run: ```bash ros2-dockergen ``` The interactive wizard will walk you through 8 steps to configure your environment. ### Command Line Options ```bash ros2-dockergen --help # Show help ros2-dockergen --version # Show version ``` --- ## Local CI With `act` To reproduce the main GitHub Actions workflow locally, install [`act`](https://nektosact.com/installation/) and run: ```bash ./scripts/run_act.sh ``` By default this runs the CI jobs one-by-one so local Docker usage stays manageable and each job's output is easy to read. If you want the original full-workflow `act` behavior instead, run: ```bash ./scripts/run_act.sh full ``` --- ## 📁 Project Structure - `src/ros2_dockergen/`: Core Python package (CLI + Logic). - `src/core.js`: Shared engine (ESM) for Web and Node.js. - `index.html`: Stunning browser-based interactive generator. - `docs/`: Visual assets and project documentation. - `tests/`: Parity validation suite (Ensures Python/JS outputs are byte-identical). --- ## 🔗 Related Resources - [Web Utility](https://ppswaroopa.github.io/ros2-dockergen/) - [Official ROS Documentation](https://docs.ros.org) - [OSRF ROS Docker Hub](https://hub.docker.com/r/osrf/ros) --- ## License Released under the [MIT License](LICENSE). Copyright © 2026 Pranava Swaroopa.