Docker
Windows Setup
Installing Docker on Windows provides a robust environment for running Linux-based toolchains via Docker Desktop and the Windows Subsystem for Linux (WSL 2).
Prerequisites
Before installing Docker Desktop, ensure your Windows machine meets the following requirements:
- Windows 10 (64-bit) or Windows 11.
- Hardware Virtualization must be enabled in your BIOS/UEFI.
- WSL 2 (Windows Subsystem for Linux) should be installed and set as the default architecture.
Install WSL 2
If you haven't installed WSL 2 yet, open PowerShell as Administrator and run:
wsl --install
Restart your computer if prompted. By default, this installs the Ubuntu distribution.
Install Docker Desktop
- Download the Docker Desktop installer from the official Docker website.
- Run the installer (
Docker Desktop Installer.exe). - When prompted, ensure the option "Use WSL 2 instead of Hyper-V" is checked.
- Follow the installation wizard to complete the setup.
- After installation, click Close and restart if necessary.
Configure Docker Desktop
- Open Docker Desktop from the Start menu.
- Accept the terms and conditions if prompted.
- Click the gear icon (⚙️) in the top right to open Settings.
- Go to General and verify that "Use the WSL 2 based engine" is checked.
- Go to Resources > WSL Integration.
- Ensure "Enable integration with my default WSL distro" is checked. If you installed additional WSL distributions (like Ubuntu), you can enable integration for those specific distros here.
- Click Apply & restart.
Verify Installation
Open a new PowerShell window or your WSL terminal (e.g., Ubuntu) and run:
docker --version
You should see output similar to Docker version 24.x.x, build xxxxxxx.
To test that Docker can pull and run containers, execute the classic hello-world image:
docker run hello-world
If successful, you will see a message saying "Hello from Docker!".
Accessing USB Devices
One limitation of Docker Desktop on Windows/Mac is that passing physical USB devices (like your ESP32 or STM32 board) directly into the container can be tricky.
For Windows, the recommended approach is:
- Build the project inside the Docker container.
- Flash the generated
.binor.elffiles from your host Windows machine using the native tools (likeesptool.pyor STM32CubeProgrammer).
Alternatively, you can use usbipd-win to bind USB devices to WSL 2, allowing the container to access them, but this is an advanced configuration.
Next Steps
Now that Docker is installed, learn how to manage multi-container applications using Docker Compose.

