This project allows you to run makeEspArduino from docker container. The docker image contains makeEspArduino and esp8266/Arduino repositories.
Run from host, replace <PROJECT_DIR> with absolute path to directory containing your source code:
docker run -it --rm \
--device /dev/ttyUSB0:/dev/ttyUSB0 \
-v <PROJECT_DIR>:/src \
ghcr.io/fedorchervyakov/esp8266-arduino-docker:master
Or to flash a demo sketch and exit:
docker run --rm \
--device /dev/ttyUSB0:/dev/ttyUSB0 \
ghcr.io/fedorchervyakov/esp8266-arduino-docker:master \
/bin/bash -c 'make -f ${MAKE_ESP_ARDUINO_BASE_DIR}/makeEspArduino.mk ESP_ROOT=${ARDUINO_ESP8266_BASE_DIR} DEMO=1 flash'
The recommended way to use this image is to provide a Makefile inside your project directory containing these two lines at the bottom:
ESP_ROOT = $(ARDUINO_ESP8266_BASE_DIR)
include $(MAKE_ESP_ARDUINO_BASE_DIR)/makeEspArduino.mk
Then you can simply run make
from inside the container. For example to flash demo sketch:
make DEMO=1 flash
For makeEspArduino to work, you have to pass paths to Makefile and esp8266/Arduino via command line arguments. Environmental variables MAKE_ESP_ARDUINO_BASE_DIR and ARDUINO_ESP8266_BASE_DIR defined inside the container contain respective paths. For example to flash demo sketch run this command inside the container:
make -f ${MAKE_ESP_ARDUINO_BASE_DIR}/makeEspArduino.mk ESP_ROOT=${ARDUINO_ESP8266_BASE_DIR} DEMO=1 flash