1
+ FROM ubuntu:18.04
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ vim \
7
+ apt-utils \
8
+ bison \
9
+ ca-certificates \
10
+ ccache \
11
+ check \
12
+ curl \
13
+ flex \
14
+ git \
15
+ gperf \
16
+ lcov \
17
+ libncurses-dev \
18
+ libusb-1.0-0-dev \
19
+ make \
20
+ ninja-build \
21
+ python3 \
22
+ python3-pip \
23
+ unzip \
24
+ wget \
25
+ xz-utils \
26
+ zip \
27
+ && apt-get autoremove -y \
28
+ && rm -rf /var/lib/apt/lists/* \
29
+ && update-alternatives --install /usr/bin/python python /usr/bin/python3 10
30
+
31
+ RUN python -m pip install --upgrade pip virtualenv
32
+
33
+ # To build the image for a branch or a tag of IDF, pass --build-arg IDF_CLONE_BRANCH_OR_TAG=name.
34
+ # To build the image with a specific commit ID of IDF, pass --build-arg IDF_CHECKOUT_REF=commit-id.
35
+ # It is possibe to combine both, e.g.:
36
+ # IDF_CLONE_BRANCH_OR_TAG=release/vX.Y
37
+ # IDF_CHECKOUT_REF=<some commit on release/vX.Y branch>.
38
+
39
+ ARG IDF_CLONE_URL=https://github.com/espressif/ESP8266_RTOS_SDK.git
40
+ ARG IDF_CLONE_BRANCH_OR_TAG=master
41
+ ARG IDF_CHECKOUT_REF=
42
+
43
+ ENV IDF_PATH=/opt/esp/ESP8266_RTOS_SDK
44
+ ENV IDF_TOOLS_PATH=/opt/esp
45
+
46
+ RUN echo IDF_CHECKOUT_REF=$IDF_CHECKOUT_REF IDF_CLONE_BRANCH_OR_TAG=$IDF_CLONE_BRANCH_OR_TAG && \
47
+ git clone --recursive \
48
+ ${IDF_CLONE_BRANCH_OR_TAG:+-b $IDF_CLONE_BRANCH_OR_TAG} \
49
+ $IDF_CLONE_URL $IDF_PATH && \
50
+ if [ -n "$IDF_CHECKOUT_REF" ]; then \
51
+ cd $IDF_PATH && \
52
+ git checkout $IDF_CHECKOUT_REF && \
53
+ git submodule update --init --recursive; \
54
+ fi
55
+
56
+ # Install all the required tools, plus CMake
57
+ RUN $IDF_PATH/tools/idf_tools.py --non-interactive install cmake \
58
+ && $IDF_PATH/tools/idf_tools.py --non-interactive install xtensa-lx106-elf \
59
+ && $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env \
60
+ && rm -rf $IDF_TOOLS_PATH/dist \
61
+ && pip install -r $IDF_PATH/requirements.txt
62
+
63
+ # Ccache is installed, enable it by default
64
+ ENV IDF_CCACHE_ENABLE=1
65
+
66
+ COPY entrypoint.sh /opt/esp/entrypoint.sh
67
+
68
+ ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
69
+
70
+ CMD [ "/bin/bash" ]
0 commit comments