forked from SergioGasquez/esp-rs-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wokwi.Dockerfile
82 lines (82 loc) · 4.48 KB
/
wokwi.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Esp Idf v4.4 enviroment with Espressif Training and example dependencies fetched
FROM sergiogasquez/esp-rs-env:espidf_v4.4
# Set user
ARG CONTAINER_USER=esp
ENV USER=${CONTAINER_USER}
USER ${CONTAINER_USER}
# Set default toolchain
ARG NIGHTLY_VERSION=nightly
RUN $HOME/.cargo/bin/rustup default ${NIGHTLY_VERSION}
# Fetch dependencies: espressif-trainings
RUN git clone -b wokwi-fetch https://github.com/SergioGasquez/ferrous-training.git espressif-trainings && \
# Hardware Check
cd $HOME/espressif-trainings/intro/hardware-check && \
$HOME/.cargo/bin/cargo fetch && \
$HOME/.cargo/bin/cargo build && \
$HOME/.cargo/bin/cargo clean && \
# Http Client
cd $HOME/espressif-trainings/intro/http-client/exercise && \
$HOME/.cargo/bin/cargo fetch && \
cd $HOME/espressif-trainings/intro/http-client/solution && \
$HOME/.cargo/bin/cargo fetch && \
# Http Server
cd $HOME/espressif-trainings/intro/http-server/exercise && \
$HOME/.cargo/bin/cargo fetch && \
cd $HOME/espressif-trainings/intro/http-server/solution && \
$HOME/.cargo/bin/cargo fetch && \
# MQTT
cd $HOME/espressif-trainings/intro/mqtt/exercise && \
$HOME/.cargo/bin/cargo fetch && \
cd $HOME/espressif-trainings/intro/mqtt/solution && \
$HOME/.cargo/bin/cargo fetch && \
cd $HOME/espressif-trainings/intro/mqtt/host-client && \
$HOME/.cargo/bin/cargo fetch && \
# Button Interrupt
cd $HOME/espressif-trainings/advanced/button-interrupt/exercise && \
$HOME/.cargo/bin/cargo fetch && \
cd $HOME/espressif-trainings/advanced/button-interrupt/solution && \
$HOME/.cargo/bin/cargo fetch && \
# I2C Driver
cd $HOME/espressif-trainings/advanced/i2c-driver/solution && \
$HOME/.cargo/bin/cargo fetch && \
# I2C Sensor Reading
cd $HOME/espressif-trainings/advanced/i2c-sensor-reading/solution && \
$HOME/.cargo/bin/cargo fetch && \
# Delete the repository
rm -rf $HOME/espressif-trainings
# Fetch dependencies: ESP32S3
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32s3 --define mcu=esp32s3 --define toolchain=nightly --define espidfver=v4.4 --define std=true && \
cd $HOME/esp32s3 && \
$HOME/.cargo/bin/cargo +esp fetch && \
rm -rf $HOME/esp32s3
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32s3nostd --define mcu=esp32s3 --define toolchain=nightly --define espidfver=v4.4 --define std=false && \
cd $HOME/esp32s3nostd && \
$HOME/.cargo/bin/cargo +esp fetch && \
rm -rf $HOME/esp32s3nostd
# Fetch dependencies: ESP32S2
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32s2 --define mcu=esp32s2 --define toolchain=nightly --define espidfver=v4.4 --define std=true && \
cd $HOME/esp32s2 && \
$HOME/.cargo/bin/cargo +esp fetch && \
rm -rf $HOME/esp32s2
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32s2nostd --define mcu=esp32s2 --define toolchain=nightly --define espidfver=v4.4 --define std=false && \
cd $HOME/esp32s2nostd && \
$HOME/.cargo/bin/cargo +esp fetch && \
rm -rf $HOME/esp32s2nostd
# Fetch dependencies: ESP32
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32 --define mcu=esp32 --define toolchain=nightly --define espidfver=v4.4 --define std=true && \
cd $HOME/esp32 && \
$HOME/.cargo/bin/cargo +esp fetch && \
rm -rf $HOME/esp32
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32nostd --define mcu=esp32 --define toolchain=nightly --define espidfver=v4.4 --define std=false && \
cd $HOME/esp32nostd && \
$HOME/.cargo/bin/cargo +esp fetch && \
rm -rf $HOME/esp32nostd
# Fetch dependencies: ESP32C3
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32c3 --define mcu=esp32c3 --define toolchain=nightly --define espidfver=v4.4 --define std=true && \
cd $HOME/esp32c3 && \
$HOME/.cargo/bin/cargo fetch && \
rm -rf $HOME/esp32c3
RUN $HOME/.cargo/bin/cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cargo --name esp32c3nostd --define mcu=esp32c3 --define toolchain=nightly --define espidfver=v4.4 --define std=false && \
cd $HOME/esp32c3nostd && \
$HOME/.cargo/bin/cargo fetch && \
rm -rf $HOME/esp32c3nostd