Skip to content

Commit a55a007

Browse files
Improve Dockerfiles (#2825)
1 parent 0e1df34 commit a55a007

File tree

13 files changed

+194
-101
lines changed

13 files changed

+194
-101
lines changed

.devcontainer/Dockerfile.All

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-all:v2.42
1+
FROM ghcr.io/nanoframework/dev-container-all:v2.43

.devcontainer/Dockerfile.AzureRTOS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.24
1+
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.25

.devcontainer/Dockerfile.ChibiOS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-chibios:v1.25
1+
FROM ghcr.io/nanoframework/dev-container-chibios:v1.26

.devcontainer/Dockerfile.ESP32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-esp32:v2.27
1+
FROM ghcr.io/nanoframework/dev-container-esp32:v2.28

.devcontainer/Dockerfile.TI

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-ti:v1.20
1+
FROM ghcr.io/nanoframework/dev-container-ti:v1.21

.devcontainer/scripts/git-pull-repos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ git pull origin V10.4.1-kernel-only
2323
cd /sources/CMSIS_5
2424
git pull origin 5.5.1
2525
cd /sources/lwip
26-
git pull origin STABLE-2_1_3_RELEASE # FIXME: if the NXP targets still require STABLE-2_0_3_RELEASE as this is quite old now.
26+
git pull origin STABLE-2_1_3_RELEASE
2727
cd /sources/spiffs
2828
git pull origin nf-build
2929
cd /sources/SimpleLinkCC32

.devcontainer/sources/Dockerfile.All

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,34 @@ RUN apt-get update \
55
curl \
66
xz-utils \
77
unzip \
8-
wget
8+
wget
99

10-
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
10+
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted
11+
12+
ARG GCC_VERSION=13.2.rel1
13+
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/$GCC_VERSION/binrel/arm-gnu-toolchain-$GCC_VERSION-x86_64-arm-none-eabi.tar.xz
1114
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
1215
&& curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \
1316
&& xz -d /tmp/dc-downloads/gcc-arm.tar.xz \
1417
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
1518
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/
1619

20+
ARG CMAKE_VERSION=3.27.6
21+
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh
22+
RUN wget $CMAKE_SCRIPT \
23+
-q -O /tmp/dc-downloads/cmake-install.sh \
24+
&& chmod u+x /tmp/dc-downloads/cmake-install.sh \
25+
&& mkdir -p /tmp/dc-extracted/cmake \
26+
&& /tmp/dc-downloads/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
27+
&& rm /tmp/dc-downloads/cmake-install.sh
28+
1729
# This is TI XDC tools for linux. Cheack all versions here: https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/index.html
1830
ARG TI_TOOL_URL=https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_62_00_08/exports/xdccore/xdctools_3_62_00_08_core_linux.zip
1931
RUN mkdir -p /tmp/dc-extracted/titools \
2032
&& curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \
2133
&& unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip
2234

23-
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh
24-
RUN wget $CMAKE_SCRIPT \
25-
-q -O /tmp/cmake-install.sh \
26-
&& chmod u+x /tmp/cmake-install.sh \
27-
&& mkdir /tmp/dc-extracted/cmake \
28-
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
29-
&& rm /tmp/cmake-install.sh
30-
31-
FROM ubuntu:latest AS devcontainer
35+
FROM python:3.10 AS devcontainer
3236

3337
# Avoid warnings by switching to noninteractive
3438
ENV DEBIAN_FRONTEND=noninteractive
@@ -53,40 +57,37 @@ RUN apt-get update \
5357
nodejs \
5458
libffi-dev
5559

56-
# Set Python 10 as the default version
57-
RUN apt-get install -y software-properties-common \
58-
&& add-apt-repository ppa:deadsnakes/ppa \
59-
&& apt-get update \
60-
&& apt-get install -y python3.10 \
61-
python3-pip
62-
6360
# Create needed directories
6461
RUN mkdir -p /usr/local/bin/gcc \
6562
&& mkdir -p /usr/local/bin/titools
6663

6764
# Clone ChibiOS repo
68-
RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs
65+
# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs
6966
# Alternative source for those having issues with git svn downloads:
70-
# RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs
67+
RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs
7168

7269
# Clone support repos for STM32 including AzureRTOS
7370
RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \
7471
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \
7572
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \
7673
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \
77-
&& git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \
78-
&& git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/netxduo.git --depth 1 ./sources/NetxDuo \
7974
&& git clone --branch nanoframework https://github.com/nanoframework/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib
8075

81-
# Clone libs mbedtls and fatfs etc.
76+
# Clone repos for AzureRTOS
77+
RUN git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \
78+
&& git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/netxduo.git --depth 1 ./sources/NetxDuo
79+
80+
# Clone dependent repos (mbedtls, fatfs and spiffs)
8281
RUN git clone --branch mbedtls-2.28.5 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
8382
&& git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
84-
&& git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip
83+
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs
8584

8685
# Clone FreeRTOS and what is needed for ESP32
8786
RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \
88-
&& git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5 \
89-
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs
87+
&& git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5
88+
89+
# Clone lwIP for STM32 and NXP
90+
RUN git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip
9091

9192
# Clone ESP-IDF
9293
RUN git clone --branch v4.4.6 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
@@ -100,11 +101,11 @@ RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC
100101
&& chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh
101102

102103
# set gcc location
103-
ENV ARM_GCC_PATH=/usr/local/bin/gcc
104-
ENV PATH=$ARM_GCC_PATH/bin:${PATH}
104+
ARG TMP_GCC_PATH=/usr/local/bin/gcc
105+
ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin
105106

106107
# Copy from our other container
107-
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
108+
COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH
108109
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools
109110
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
110111

@@ -113,7 +114,7 @@ ENV PATH=/usr/bin/cmake/bin:${PATH}
113114
# Putting hex2dfu in the container
114115
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu
115116

116-
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v3.0.2/hex2dfu
117+
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu
117118
RUN mkdir -p $HEX2DFU_PATH \
118119
&& curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \
119120
&& chmod +x $HEX2DFU_PATH/hex2dfu

.devcontainer/sources/Dockerfile.AzureRTOS

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@ RUN apt-get update \
55
curl \
66
xz-utils \
77
unzip \
8-
wget
8+
wget
99

10-
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
10+
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted
11+
12+
ARG GCC_VERSION=13.2.rel1
13+
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/$GCC_VERSION/binrel/arm-gnu-toolchain-$GCC_VERSION-x86_64-arm-none-eabi.tar.xz
1114
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
1215
&& curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \
1316
&& xz -d /tmp/dc-downloads/gcc-arm.tar.xz \
1417
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
1518
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/
1619

17-
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh
20+
ARG CMAKE_VERSION=3.27.6
21+
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh
1822
RUN wget $CMAKE_SCRIPT \
19-
-q -O /tmp/cmake-install.sh \
20-
&& chmod u+x /tmp/cmake-install.sh \
21-
&& mkdir /tmp/dc-extracted/cmake \
22-
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
23-
&& rm /tmp/cmake-install.sh
23+
-q -O /tmp/dc-downloads/cmake-install.sh \
24+
&& chmod u+x /tmp/dc-downloads/cmake-install.sh \
25+
&& mkdir -p /tmp/dc-extracted/cmake \
26+
&& /tmp/dc-downloads/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
27+
&& rm /tmp/dc-downloads/cmake-install.sh
2428

2529
FROM ubuntu:latest AS devcontainer
2630

@@ -47,34 +51,40 @@ RUN apt-get update \
4751
# Create needed directories
4852
RUN mkdir -p /usr/local/bin/gcc
4953

50-
# Clone repos for STM32 including AzureRTOS
51-
RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs \
52-
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \
54+
# Clone ChibiOS repo (used for HAL)
55+
# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs
56+
# Alternative source for those having issues with git svn downloads:
57+
RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs
58+
59+
# Clone repos for STM32
60+
RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \
5361
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \
5462
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \
55-
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \
56-
&& git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \
63+
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7
64+
65+
# Clone repos for AzureRTOS
66+
RUN git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \
5767
&& git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/netxduo.git --depth 1 ./sources/NetxDuo
5868

59-
# Clone mbedtls and fatfs
69+
# Clone dependent repos (mbedtls, fatfs and spiffs)
6070
RUN git clone --branch mbedtls-2.28.5 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
6171
&& git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
6272
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs
6373

6474
# set gcc location
65-
ENV ARM_GCC_PATH=/usr/local/bin/gcc
66-
ENV PATH=$ARM_GCC_PATH/bin:${PATH}
75+
ARG TMP_GCC_PATH=/usr/local/bin/gcc
76+
ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin
6777

6878
# Copy from our other container
69-
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
79+
COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH
7080
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
7181

7282
ENV PATH=/usr/bin/cmake/bin:${PATH}
7383

7484
# Putting hex2dfu in the container
7585
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu
7686

77-
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v3.0.2/hex2dfu
87+
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu
7888
RUN mkdir -p $HEX2DFU_PATH \
7989
&& curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \
8090
&& chmod +x $HEX2DFU_PATH/hex2dfu

.devcontainer/sources/Dockerfile.ChibiOS

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@ RUN apt-get update \
55
curl \
66
xz-utils \
77
unzip \
8-
wget
8+
wget
99

10-
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
10+
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted
11+
12+
ARG GCC_VERSION=13.2.rel1
13+
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/$GCC_VERSION/binrel/arm-gnu-toolchain-$GCC_VERSION-x86_64-arm-none-eabi.tar.xz
1114
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
1215
&& curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \
1316
&& xz -d /tmp/dc-downloads/gcc-arm.tar.xz \
1417
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
1518
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/
1619

17-
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh
20+
ARG CMAKE_VERSION=3.27.6
21+
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh
1822
RUN wget $CMAKE_SCRIPT \
19-
-q -O /tmp/cmake-install.sh \
20-
&& chmod u+x /tmp/cmake-install.sh \
21-
&& mkdir /tmp/dc-extracted/cmake \
22-
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
23-
&& rm /tmp/cmake-install.sh
23+
-q -O /tmp/dc-downloads/cmake-install.sh \
24+
&& chmod u+x /tmp/dc-downloads/cmake-install.sh \
25+
&& mkdir -p /tmp/dc-extracted/cmake \
26+
&& /tmp/dc-downloads/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
27+
&& rm /tmp/dc-downloads/cmake-install.sh
2428

2529
FROM ubuntu:latest AS devcontainer
2630

@@ -45,41 +49,41 @@ RUN apt-get update \
4549
srecord
4650

4751
# Create needed directories
48-
RUN mkdir -p /usr/local/bin/GCC_URI
52+
RUN mkdir -p /usr/local/bin/gcc
4953

5054

5155
# Clone ChibiOS repo
52-
RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs
56+
# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs
5357
# Alternative source for those having issues with git svn downloads:
54-
# RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs
58+
RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs
5559

56-
# Clone support repos for STM32 including AzureRTOS
60+
# Clone support repos for STM32
5761
RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \
5862
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \
5963
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \
60-
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \
64+
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \
6165
&& git clone --branch nanoframework https://github.com/nanoframework/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib
6266

63-
# Clone libs including mbedtls and fatfs
67+
# Clone dependent repos (mbedtls, fatfs and spiffs etc.)
6468
RUN git clone --branch mbedtls-2.28.5 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
6569
&& git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
6670
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs \
6771
&& git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip
6872

6973
# set gcc location
70-
ENV ARM_GCC_PATH=/usr/local/bin/gcc
71-
ENV PATH=$ARM_GCC_PATH/bin:${PATH}
74+
ARG TMP_GCC_PATH=/usr/local/bin/gcc
75+
ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin
7276

7377
# Copy from our other container
74-
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
78+
COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH
7579
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
7680

7781
ENV PATH=/usr/bin/cmake/bin:${PATH}
7882

7983
# Putting hex2dfu in the container
8084
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu
8185

82-
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v3.0.2/hex2dfu
86+
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu
8387
RUN mkdir -p $HEX2DFU_PATH \
8488
&& curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \
8589
&& chmod +x $HEX2DFU_PATH/hex2dfu

.devcontainer/sources/Dockerfile.ESP32

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ RUN apt-get update \
77
unzip \
88
wget
99

10-
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc
10+
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted
1111

12-
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh
12+
ARG CMAKE_VERSION=3.27.6
13+
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh
1314
RUN wget $CMAKE_SCRIPT \
14-
-q -O /tmp/cmake-install.sh \
15-
&& chmod u+x /tmp/cmake-install.sh \
16-
&& mkdir /tmp/dc-extracted/cmake \
17-
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
18-
&& rm /tmp/cmake-install.sh
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
1920

20-
FROM ubuntu:latest AS devcontainer
21+
FROM python:3.10 AS devcontainer
2122

2223
# Avoid warnings by switching to noninteractive
2324
ENV DEBIAN_FRONTEND=noninteractive
@@ -40,13 +41,6 @@ RUN apt-get update \
4041
nodejs \
4142
libffi-dev
4243

43-
# Set Python 10 as the default version
44-
RUN apt-get install -y software-properties-common \
45-
&& add-apt-repository ppa:deadsnakes/ppa \
46-
&& apt-get update \
47-
&& apt-get install -y python3.10 \
48-
python3-pip
49-
5044
# Create needed directories
5145
RUN mkdir -p /usr/local/bin/gcc
5246

0 commit comments

Comments
 (0)