|
| 1 | +# Note: gitpod/workspace-base image references older version of CMake, it's necessary to install newer one |
| 2 | +FROM gitpod/workspace-base |
| 3 | +ENV LC_ALL=C.UTF-8 |
| 4 | +ENV LANG=C.UTF-8 |
| 5 | +ARG CONTAINER_USER=gitpod |
| 6 | +ARG CONTAINER_GROUP=gitpod |
| 7 | +ARG NIGHTLY_VERSION=nightly-2022-03-10 |
| 8 | +ARG ESP_IDF_VERSION=v4.4.1 |
| 9 | +ARG ESP_BOARD=esp32c3 |
| 10 | +RUN sudo install-packages git curl gcc clang ninja-build libudev-dev \ |
| 11 | + python3 python3-pip libusb-1.0-0 libssl-dev pkg-config libtinfo5 libpython2.7 |
| 12 | +USER ${CONTAINER_USER} |
| 13 | +WORKDIR /home/${CONTAINER_USER} |
| 14 | +ENV PATH=${PATH}:/home/${CONTAINER_USER}/.cargo/bin |
| 15 | +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ |
| 16 | + --default-toolchain ${NIGHTLY_VERSION} -y \ |
| 17 | + && $HOME/.cargo/bin/rustup component add rust-src --toolchain ${NIGHTLY_VERSION} \ |
| 18 | + && $HOME/.cargo/bin/rustup target add riscv32imc-unknown-none-elf \ |
| 19 | + && $HOME/.cargo/bin/cargo install cargo-espflash ldproxy |
| 20 | +RUN mkdir -p ${HOME}/.espressif/frameworks/ \ |
| 21 | + && git clone --branch ${ESP_IDF_VERSION} -q --depth 1 --shallow-submodules \ |
| 22 | + --recursive https://github.com/espressif/esp-idf.git \ |
| 23 | + ${HOME}/.espressif/frameworks/esp-idf \ |
| 24 | + && python3 ${HOME}/.espressif/frameworks/esp-idf/tools/idf_tools.py install cmake \ |
| 25 | + && ${HOME}/.espressif/frameworks/esp-idf/install.sh ${ESP_BOARD} \ |
| 26 | + && rm -rf .espressif/dist \ |
| 27 | + && rm -rf .espressif/frameworks/esp-idf/docs \ |
| 28 | + && rm -rf .espressif/frameworks/esp-idf/examples \ |
| 29 | + && rm -rf .espressif/frameworks/esp-idf/tools/esp_app_trace \ |
| 30 | + && rm -rf .espressif/frameworks/esp-idf/tools/test_idf_size |
| 31 | +ENV IDF_TOOLS_PATH=/home/${CONTAINER_USER}/.espressif |
0 commit comments