Docker
Why Docker?
Docker is a platform designed to help developers build, share, and run applications in isolated environments called containers.
Why Use Docker for Embedded Development?
Embedded toolchains (like ESP-IDF, STM32CubeIDE, or cross-compilers for Raspberry Pi) are notoriously difficult to set up and maintain. They require specific versions of Python, CMake, GCC, and various libraries. Installing them directly on your host machine can lead to:
- Dependency Conflicts: One project requires Python 3.8, while another needs Python 3.11.
- "It Works on My Machine" Syndrome: A project builds perfectly on your laptop but fails on your teammate's computer or the CI/CD server.
- System Clutter: Installing multiple toolchains leaves behind gigabytes of files, environment variables, and hidden dependencies.
Docker solves this by packaging the entire toolchain—along with the exact versions of all dependencies—into a self-contained unit.
Key Benefits
- Reproducibility: Everyone uses the exact same environment. If it builds in the container, it builds everywhere.
- Isolation: The toolchain doesn't interfere with your host system. You can have multiple versions of ESP-IDF installed in different containers without conflicts.
- Easy Cleanup: Want to remove a toolchain? Just delete the Docker image. No uninstallers needed.
- CI/CD Ready: The same Docker image used for local development can be used in your automated build pipelines.
How It Works
Instead of running idf.py build on your host operating system, you run it inside a Docker container that already has ESP-IDF installed.
- You write code on your host machine using VS Code.
- You map your project directory to a directory inside the Docker container (using volumes).
- You execute build commands inside the container.
- The compiled binaries are saved back to your host machine's project directory.
What's Next?
In the following sections, we will guide you through installing Docker on your operating system and setting up a basic container for embedded development.
Choose your operating system to get started:

