ESP32 – dockerized toolchain

Docker image built on top of espressif/idf with xtensa toolchain, ESP_IDF, and few additional tools:

  • xtensa toolchain (2019; crosstool-NG esp-2019r2; 8.2.0)
  • (v2.9-dev)
  • make (v4.1)
  • cmake (v3.10.2)



Bellow you can find recommended simple one-line installer that pulls the newest docker-image and installs esp32-toolchainscript into “/usr/bin/” directory.

curl | bash -s --

Getting started

  1. Install toolchain using recommended simple one-line installer.
  2. Use super command esp32-toolchain for all toolchain binaries.
  3. Execute toolchain binaries inside your working/project directory.


$ cd your-project/
$ esp8266-toolchain build
$ esp8266-toolchain flash
$ esp8266-toolchain monitor
$ esp8266-toolchain xtensa-esp32-elf-gcc --version
$ esp8266-toolchain make -version
$ esp8266-toolchain cmake -version
$ esp8266-toolchain make menuconfig
$ esp8266-toolchain make && make flash monitor

Building image locally

git clone
cd esp32-toolchain
docker build --rm -t lpodkalicki/esp32-toolchain:latest .

An example of running toolchain binary

docker run --rm --privileged -v $(pwd):/build lpodkalicki/esp32-toolchain xtensa-esp32-elf-gcc --version

Leave a Comment