This is dockerfile
# Use the Ubuntu base image
FROM ubuntu:22.04 as build
# Actualizar la lista de paquetes
RUN apt-get update && \
apt-get install -y -q \
git cmake gperf \
doxygen erlang-base erlang-dialyzer \
libglib2.0-0 libpixman-1-0 \
gcc g++ zlib1g-dev libsdl2-2.0-0 libslirp0 libmbedtls-dev
# Create a directory to mount the volume
RUN mkdir /myvolume
# Set the working directory
WORKDIR /myvolume
# Start a bash shell by default
CMD ["bash"]
after running these commands >
git clone -b v5.1.2 --recursive https://github.com/espressif/esp-idf.git esp-idf-v5.1.2
cd esp-idf-v5.1.2/
. ./install.sh
. ./export.sh
cd ~
git clone https://github.com/atomvm/AtomVM.git
cd /AtomVM/src/platforms/esp32/components
git clone https://github.com/atomvm/atomvm_mqtt_client.git
cd ..
idf.py set-target esp32
idf.py reconfigure
idf.py build
./build/mkimage.sh
Then I erase the memory and then program the esp32
esptool.py --chip auto --port /dev/tty.usbserial-0001 --baud 921600 erase_flash
esptool.py --chip auto --port /dev/tty.usbserial-0001 --baud 115200 --before default_reset --after hard_reset write_flash -u --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 Users/joserodriguez/atomvm/AtomVM/src/platforms/esp32/build/atomvm-esp32.img