Docker Sandboxes Let AI Agents Flash ESP32 Boards Safely

ESP32 Firmware Development with Docker Sandboxes

Firmware development for ESP32 is notoriously brittle: toolchain mismatches, 'works on my machine' builds, and the pain of juggling legacy and new features. Docker's official `espressif/idf` image makes builds reproducible, while Docker Sandboxes (the `sbx` CLI) take it further by letting AI coding agents work on firmware without touching your host. This post shows a practical workflow: pinning image tags, using udev rules for stable device names, running parallel containers for different IDF versions, and even flashing real hardware from inside a sandbox via an RFC2217 serial bridge. The result: safe, unsupervised AI sessions that can edit, build, and flash—with minimal blast radius.

The agent can install packages, modify system config, build and run containers, and none of it touches your host.
  1. pietrofmaggi

    This seems the natural evolution of what used to be:

    1. A laptop with the development environment (DOS or Windows) kept in a box to use for updates / fixes

    2. A VM on a NAS to use when a firmware in maintenance needs a fix

    With more embedded tooling available on Linux, a docker image becames a natural choice.

  2. jakewins

    I tried this a while back and found it ended up being easier to just give the firmware agent a dedicated machine, there’s so much low-level stuff you want access to for iterating on firmware, and the docker layers kept confusing the agents when they were debugging faults, crashes, brownouts etc.

    Combining a dedicated small machine with a USB hub that supports per-port power cycling lets the agent iterate and un-wedge stuff with no human intervention for very long (days) periods. Obviously any software produced that way is unusable, but it’s incredible for debugging. Agent gets a programmable oscilloscope, power-cycling, and peripherals (also power-cycleable) emulating the various things our product talks to in the wild.

    TL;DR I found the docker layers just caused confusion for the agent and giving her an old laptop was way simpler and much more powerful

  3. itopaloglu83

    Now we need a full virtual chip in docker to simulate it. That would be incredible.

More from this day

2026-08-22