|
1 | | -FROM ubuntu:latest AS downloader |
2 | | -RUN apt-get update \ |
3 | | - && apt-get -y install --no-install-recommends apt-utils \ |
4 | | - && apt-get install -y \ |
5 | | - curl \ |
6 | | - bzip2 \ |
7 | | - unzip \ |
8 | | - wget |
9 | | - |
10 | | -RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted |
11 | | - |
12 | | -ARG CMAKE_VERSION=3.31.6 |
13 | | -ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh |
14 | | -RUN wget $CMAKE_SCRIPT \ |
15 | | - -q -O /tmp/dc-downloads/cmake-install.sh \ |
16 | | - && chmod u+x /tmp/dc-downloads/cmake-install.sh \ |
17 | | - && mkdir -p /tmp/dc-extracted/cmake \ |
18 | | - && /tmp/dc-downloads/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \ |
19 | | - && rm /tmp/dc-downloads/cmake-install.sh |
20 | | - |
21 | | -FROM python:3.11 AS devcontainer |
22 | | - |
23 | | -# Avoid warnings by switching to noninteractive |
24 | | -ENV DEBIAN_FRONTEND=noninteractive |
25 | | - |
26 | | -# You can set up non-root user |
27 | | -# ARG USERNAME=vscode |
28 | | -# ARG USER_UID=1000 |
29 | | -# ARG USER_GID=$USER_UID |
30 | | - |
31 | | -# Configure apt and install packages |
32 | | -RUN apt-get update \ |
33 | | - && apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 \ |
34 | | - && apt-get install -y \ |
35 | | - git \ |
36 | | - git-lfs \ |
37 | | - clang-format \ |
38 | | - curl \ |
39 | | - ninja-build \ |
40 | | - srecord \ |
41 | | - nodejs \ |
42 | | - libffi-dev |
43 | | - |
44 | | -# Create needed directories |
45 | | -RUN mkdir -p /usr/local/bin/gcc |
46 | | - |
47 | | -# Clone fatfs |
48 | | -RUN git clone --branch R0.15a https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs |
49 | | - |
50 | | -# Clone ESP-IDF |
51 | | -RUN git clone --branch v5.2.3 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf |
52 | | - |
53 | | -# Creating static link python for pyhton3 |
54 | | -RUN ln -fs /usr/bin/python3 /usr/bin/python \ |
55 | | - && pip3 install pyserial |
56 | | - |
57 | | -# copy from our other container |
58 | | -COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake |
59 | | - |
60 | | -ENV PATH=/usr/bin/cmake/bin:${PATH} |
61 | | - |
62 | | -# Install ESP-IDF |
63 | | -ENV IDF_PATH=/sources/esp-idf |
64 | | -ENV ESP_PATCH_VER=esp-13.2.0_20230928 |
65 | | -# This is now taking care in the following line |
66 | | -# RUN python -m pip install -r $IDF_PATH/requirements.txt |
67 | | -RUN $IDF_PATH/install.sh |
68 | | - |
69 | | -ENV PATH=/root/.espressif/python_env/idf5.2_py3.11_env/bin:$PATH:\ |
70 | | -$IDF_PATH/components/esptool_py/esptool:\ |
71 | | -$IDF_PATH/components/espcoredump:\ |
72 | | -$IDF_PATH/components/partition_table/:\ |
73 | | -$IDF_PATH/tools/:\ |
74 | | -$IDF_PATH/components/app_update:\ |
75 | | -/root/.espressif/tools/xtensa-esp-elf/$ESP_PATCH_VER/xtensa-esp-elf/bin:\ |
76 | | -/root/.espressif/tools/riscv32-esp-elf/$ESP_PATCH_VER/riscv32-esp-elf/bin |
77 | | - |
78 | | -# Clean up downloaded files |
79 | | -RUN apt-get autoremove -y \ |
80 | | - && apt-get clean -y \ |
81 | | - && rm -rf /var/lib/apt/lists/* |
82 | | - |
83 | | -# Switch back to dialog for any ad-hoc use of apt-get |
84 | | -ENV DEBIAN_FRONTEND=dialog |
| 1 | +FROM ubuntu:latest AS downloader |
| 2 | +RUN apt-get update \ |
| 3 | + && apt-get -y install --no-install-recommends apt-utils \ |
| 4 | + && apt-get install -y \ |
| 5 | + curl \ |
| 6 | + bzip2 \ |
| 7 | + unzip \ |
| 8 | + wget |
| 9 | + |
| 10 | +RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted |
| 11 | + |
| 12 | +ARG CMAKE_VERSION=3.31.6 |
| 13 | +ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh |
| 14 | +RUN wget $CMAKE_SCRIPT \ |
| 15 | + -q -O /tmp/dc-downloads/cmake-install.sh \ |
| 16 | + && chmod u+x /tmp/dc-downloads/cmake-install.sh \ |
| 17 | + && mkdir -p /tmp/dc-extracted/cmake \ |
| 18 | + && /tmp/dc-downloads/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \ |
| 19 | + && rm /tmp/dc-downloads/cmake-install.sh |
| 20 | + |
| 21 | +FROM python:3.11 AS devcontainer |
| 22 | + |
| 23 | +# Avoid warnings by switching to noninteractive |
| 24 | +ENV DEBIAN_FRONTEND=noninteractive |
| 25 | + |
| 26 | +# You can set up non-root user |
| 27 | +# ARG USERNAME=vscode |
| 28 | +# ARG USER_UID=1000 |
| 29 | +# ARG USER_GID=$USER_UID |
| 30 | + |
| 31 | +# Configure apt and install packages |
| 32 | +RUN apt-get update \ |
| 33 | + && apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 \ |
| 34 | + && apt-get install -y \ |
| 35 | + git \ |
| 36 | + git-lfs \ |
| 37 | + clang-format \ |
| 38 | + curl \ |
| 39 | + ninja-build \ |
| 40 | + srecord \ |
| 41 | + nodejs \ |
| 42 | + libffi-dev \ |
| 43 | + libusb-1.0 |
| 44 | + |
| 45 | +# Create needed directories |
| 46 | +RUN mkdir -p /usr/local/bin/gcc |
| 47 | + |
| 48 | +# Clone fatfs |
| 49 | +RUN git clone --branch R0.15a https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs |
| 50 | + |
| 51 | +# Clone ESP-IDF |
| 52 | +RUN git clone --branch v5.4.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf |
| 53 | + |
| 54 | +# Creating static link python for pyhton3 |
| 55 | +RUN ln -fs /usr/bin/python3 /usr/bin/python \ |
| 56 | + && pip3 install pyserial |
| 57 | + |
| 58 | +# copy from our other container |
| 59 | +COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake |
| 60 | + |
| 61 | +ENV PATH=/usr/bin/cmake/bin:${PATH} |
| 62 | + |
| 63 | +# Install ESP-IDF |
| 64 | +ENV IDF_PATH=/sources/esp-idf |
| 65 | +ENV ESP_PATCH_VER=esp-14.2.0_20241119 |
| 66 | +# This is now taking care in the following line |
| 67 | +# RUN python -m pip install -r $IDF_PATH/requirements.txt |
| 68 | +RUN $IDF_PATH/install.sh |
| 69 | + |
| 70 | +ENV PATH=/root/.espressif/python_env/idf5.4_py3.11_env/bin:$PATH:\ |
| 71 | +$IDF_PATH/components/esptool_py/esptool:\ |
| 72 | +$IDF_PATH/components/espcoredump:\ |
| 73 | +$IDF_PATH/components/partition_table/:\ |
| 74 | +$IDF_PATH/tools/:\ |
| 75 | +$IDF_PATH/components/app_update:\ |
| 76 | +/root/.espressif/tools/xtensa-esp-elf/$ESP_PATCH_VER/xtensa-esp-elf/bin:\ |
| 77 | +/root/.espressif/tools/riscv32-esp-elf/$ESP_PATCH_VER/riscv32-esp-elf/bin |
| 78 | + |
| 79 | +# Clean up downloaded files |
| 80 | +RUN apt-get autoremove -y \ |
| 81 | + && apt-get clean -y \ |
| 82 | + && rm -rf /var/lib/apt/lists/* |
| 83 | + |
| 84 | +# Switch back to dialog for any ad-hoc use of apt-get |
| 85 | +ENV DEBIAN_FRONTEND=dialog |
0 commit comments