Multi-service Docker Compose environment running Ubuntu 22.04 with ROS 2 Humble and Node.js dependencies.
Used for software development across main rover autonomy, simulation, and web GUI systems for Wisconsin Robotics.
-
Install WSL2 if on Windows.
IMPORTANT: All terminal commands should run in the WSL terminal on Windows.
-
Install and configure Git, then generate an SSH key for GitHub (see Git and CI/CD training). Ensure
ssh-agentis running on your host machine to allow Git operations inside containers. -
Install Docker Desktop on Windows or Docker Desktop on Mac.
-
Install
makeandvcstoolin a (WSL) terminal:sudo apt update && sudo apt install -y make python3-vcstoolInstall
makeon Mac by installing Xcode Command Line Tools andvcstoolviapip3 install vcstool.
-
Clone this repository:
git clone git@github.com:WisconsinRobotics/WRoverSoftware_Docker.git cd WRoverSoftware_Docker -
Import child repositories (
WRoverSoftware,WRoverSoftwareSim,WRoverSoftwareGUI) into the./workspacedirectory:make setup
-
Set safe directory permissions for Git if prompted:
git config --global --add safe.directory "*"
-
Ensure Docker Engine / Docker Desktop is running.
-
Build all container images (
main,sim,gui):make build
NOTE: You only need to rebuild when a
Dockerfilechanges.
-
Start all services in the background:
make up
-
Attach an interactive shell to a specific running service:
make shell-main # Main ROS 2 autonomy stack make shell-sim # Simulation environment make shell-gui # Web GUI stack
-
Stop all running containers:
make down
The workspace repositories are bind-mounted into the containers live from ./workspace/. Each repository operates independently.
-
Check out a different branch for a single repository:
cd workspace/WRoverSoftwareSim git checkout main -
Switch all workspace repositories simultaneously using
vcstool:vcs custom workspace --args checkout dev
-
Check workspace status across all repositories:
vcs status workspace
-
Install VS Code.
-
Install the Dev Containers extension in VS Code.
-
Open the
WRoverSoftware_Dockerfolder in VS Code:code . -
Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) and select Dev Containers: Open Folder in Container.... -
Choose the
.devcontainerconfiguration for the service you want to develop in:.devcontainer/main.devcontainer/sim.devcontainer/gui
-
To disconnect, click the bottom-left corner of VS Code, select Close Remote Connection, and stop the stack using
make down.
-
Python & ROS Dependencies: Add ROS 2 or system dependencies to the respective service
DockerfileinDockerfiles/, then rebuild the container:make build
-
Node.js Packages (GUI): Install packages directly inside
WRoverSoftwareGUIusingnpm install <package-name>or updatepackage.json.