A Docker containerized ROS Humble development environment with NiceGUI support for building web-based UIs for robotics applications.
- Docker Desktop installed and running
- Git (for cloning repositories)
- A terminal/PowerShell
git clone https://github.com/yourusername/docker-container.git
cd docker-containerClone the project you want to work on into your desired location:
git clone https://github.com/yourusername/Basestation-nicegui.gitThe container uses a relative mount path (.:/ws), so you have two options:
Place your project in the same directory as docker-compose.yml:
# Copy/move your Basestation-nicegui into the docker-container folder
cp -r ../Basestation-nicegui ./Basestation-nicegui
# Then run from the docker-container directory
cd docker-container
docker compose up --buildUpdate the volume mount in docker-compose.yml to point to your project:
volumes:
- "../Basestation-nicegui:/ws" # Relative path to your project
# OR absolute path (cross-platform):
- "/path/to/your/Basestation-nicegui:/ws"docker compose up --builddocker pull ros:humble-ros-base
docker compose up --builddocker compose downdocker compose exec ros-dev bashsource /opt/ros/humble/setup.bash
colcon build --symlink-install
source install/setup.bashcd /ws
python3 rover_ui.pyOr if your app is in a subdirectory:
cd /ws/nicegui_test
python3 rover_ui.pyAfter starting the NiceGUI application, open your browser and navigate to:
http://localhost:8080
docker-container/
├── Dockerfile # ROS + Python environment
├── docker-compose.yml # Container orchestration
├── requirements.txt # Python dependencies
├── README.md # This file
└── [mounted project]/ # Your Basestation-nicegui project mounts to /ws
The container includes:
- Base: ROS Humble
- System Packages:
- python3-pip
- python3-colcon-common-extensions
- git
- Python Packages (from requirements.txt):
- nicegui
Add more Python dependencies by editing requirements.txt and rebuilding the container.
docker compose up --build --no-cacheEnsure Docker Desktop has adequate permissions and try restarting it.
Modify the port mapping in docker-compose.yml:
ports:
- "8081:8080" # Host port 8081 → Container port 8080Rebuild the container:
docker compose down
docker compose up --build- Clone your project locally
- Mount it in the docker-compose.yml
- Start the container (
docker compose up --build) - Connect to container (
docker compose exec ros-dev bash) - Build ROS workspace (
colcon build --symlink-install) - Run your application (
python3 rover_ui.py) - Access via browser (
http://localhost:8080)
Edit requirements.txt and add your package:
nicegui
numpy
requests
Then rebuild:
docker compose up --build