esphome-docker

Containerized ESPHome CLI wrapper for compiling, validating, and flashing over Wi-Fi.

ESP32 & ESPHomeDaily useCode: not public yet

What it does

Managing local ESPHome installations across workstations frequently creates dependency conflicts and bloated toolchains. esphome-docker encapsulates the ESPHome environment within a lightweight Docker container, mounting the current directory as the project root and sharing a persistent host compilation cache. It allows developers and automation scripts to validate configuration files, compile micro-controller firmware with PlatformIO, upload binaries wirelessly over the local network via OTA, and monitor live streaming logs without installing Python dependencies or PlatformIO libraries on the host operating system.

  • Validates ESPHome YAML configuration files inside an isolated container.
  • Compiles firmware binaries using a shared persistent PlatformIO build cache.
  • Uploads compiled firmware to target microcontrollers wirelessly via OTA.
  • Streams live device logs directly over the local network.

Commands

CommandWhat it does
esphome-docker config project.yamlValidates the ESPHome YAML configuration syntax.
esphome-docker compile project.yamlCompiles the micro-controller firmware using cached dependencies.
esphome-docker upload project.yaml --device sensor-node.localUploads the compiled firmware over the air (OTA) to the target device.
esphome-docker logs project.yaml --device sensor-node.localConnects to the wireless device and streams real-time console logs.

Design principles

  • Zero host pollution: encapsulates all build dependencies, compilers, and toolchains in Docker.
  • Persistent caching: preserves PlatformIO packages and build artifacts across container runs.
  • Narrow execution scope: dedicated exclusively to configuration, compilation, and OTA network workflows.

Built with

BashDocker

Works with

ESPHome