docker build -t my-esp-build .docker run --rm -v $PWD:/project --privileged -w /project -it my-esp-build. /opt/esp/idf/export.sh && cd /micropython/ports/esp32/In container
cp -rf build-GENERIC/ /buildIn case esptool.py execution doesn't work for you - you can try to run it with python -m esptool or python3 -m esptool. This also is applicable to bash scripts. Docs
In treminal
esptool.py --port /dev/tty.usbserial-0001 erase_flashIn treminal
esptool.py --port /dev/tty.usbserial-0001 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build-GENERIC/bootloader/bootloader.bin 0x8000 build-GENERIC/partition_table/partition-table.bin 0x10000 build-GENERIC/micropython.binssh-add ~/.ssh/id_rsabash build-image.shbash run.shIn container
bash build.shIn treminal
bash erase.shIn treminal
bash deploy.sh