-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitpod.Dockerfile
39 lines (33 loc) · 1.34 KB
/
.gitpod.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
# Note: gitpod/workspace-base image references older version of CMake, it's necessary to install newer one
FROM gitpod/workspace-full
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
# ARGS
ARG CONTAINER_USER=gitpod
ARG CONTAINER_GROUP=gitpod
ARG ESP_BOARD="esp32,esp32s2,esp32s3,esp32c3"
ARG INSTALL_RUST_TOOLCHAIN=espup
# Install dependencies for building wokwi-server
RUN sudo install-packages libudev-dev
# Install build/runtime dependencies for application
RUN sudo install-packages libsdl2-dev
# RUN sudo install-packages git curl gcc ninja-build libudev-dev \
# libusb-1.0-0 libssl-dev pkg-config libtinfo5 clang \
# libsdl2-dev npm
# Set User
USER ${CONTAINER_USER}
WORKDIR /home/${CONTAINER_USER}
# Install Rust toolchain, extra crates and esp-idf
ENV PATH=${PATH}:/home/${CONTAINER_USER}/.cargo/bin:/home/${CONTAINER_USER}/opt/bin
ADD --chown=${CONTAINER_USER}:${CONTAINER_GROUP} \
https://github.com/esp-rs/espup/releases/latest/download/espup-x86_64-unknown-linux-gnu \
/home/${CONTAINER_USER}/${INSTALL_RUST_TOOLCHAIN}
RUN chmod a+x ${INSTALL_RUST_TOOLCHAIN} \
&& ./${INSTALL_RUST_TOOLCHAIN} install \
--extra-crates "cargo-espflash,wokwi-server" \
--export-file /home/${CONTAINER_USER}/export-esp.sh \
--targets "${ESP_BOARD}"
# Disabled:
# && rustup component add clippy rustfmt
# Not released to crates.io:
# cargo install web-flash