-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.idf_base
36 lines (29 loc) · 1.12 KB
/
Dockerfile.idf_base
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
# To build Docker image, call `docker build` from the current directory of this
# file
#
# References:
# - ESP32 get started:
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html
FROM ubuntu:22.04@sha256:965fbcae990b0467ed5657caceaec165018ef44a4d2d46c7cdea80a9dff0d1ea
# 20230121
ENV ESPIDF_COMMIT_SHA="49551cc48cb3cdd5563059028749616de313f0ec"
SHELL ["/bin/bash", "-c"]
# Install dependencies
RUN apt update && apt upgrade -y && \
apt install -y git wget flex bison gperf python3 python3-venv \
cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 \
vim xxd file
ENV HOME /home/esp
WORKDIR ${HOME}/
# Obtain ESP-IDF, and set up tools & environment
RUN git clone https://github.com/espressif/esp-idf.git && \
cd esp-idf && \
git checkout ${ESPIDF_COMMIT_SHA} && \
git submodule update --init --recursive && \
./install.sh esp32,esp32s2,esp32s3
# Create user "esp". Group dialout is for USB access from container
RUN useradd -g dialout -m esp && \
cp /root/.bashrc /home/esp/ && \
chown -R --from=root esp /home/esp
USER esp
CMD ["/bin/bash"]