Skip to content

Commit dd8205e

Browse files
committed
Fix install of CMake in dev container
- Now downloading in download container. ***NO_CI***
1 parent 2b8c7ee commit dd8205e

10 files changed

+69
-61
lines changed

.devcontainer/Dockerfile.All

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-all:v2.28
1+
FROM ghcr.io/nanoframework/dev-container-all:v2.29

.devcontainer/Dockerfile.AzureRTOS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.15
1+
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.16

.devcontainer/Dockerfile.ChibiOS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-chibios:v1.15
1+
FROM ghcr.io/nanoframework/dev-container-chibios:v1.16

.devcontainer/Dockerfile.ESP32

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-esp32:v2.23
1+
FROM ghcr.io/nanoframework/dev-container-esp32:v2.24

.devcontainer/Dockerfile.TI

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-ti:v1.15
1+
FROM ghcr.io/nanoframework/dev-container-ti:v1.16

.devcontainer/sources/Dockerfile.All

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ RUN apt-get update \
44
&& apt-get install -y \
55
curl \
66
xz-utils \
7-
unzip
7+
unzip \
8+
wget
89

910
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz
1011
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
@@ -19,6 +20,14 @@ RUN mkdir -p /tmp/dc-extracted/titools \
1920
&& curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \
2021
&& unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip
2122

23+
ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-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+
2231
FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer
2332

2433
# Avoid warnings by switching to noninteractive
@@ -90,7 +99,9 @@ ENV PATH=$ARM_GCC_PATH/bin:${PATH}
9099
# Copy from our other container
91100
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
92101
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools
93-
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
102+
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
103+
104+
ENV PATH=/usr/bin/cmake/bin:${PATH}
94105

95106
# Putting hex2dfu in the container
96107
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu
@@ -104,16 +115,6 @@ RUN mkdir -p $HEX2DFU_PATH \
104115
RUN ln -fs /usr/bin/python3 /usr/bin/python \
105116
&& pip3 install pyserial
106117

107-
ARG CMAKE_VERSION=3.24.0
108-
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
109-
-q -O /tmp/cmake-install.sh \
110-
&& chmod u+x /tmp/cmake-install.sh \
111-
&& mkdir /usr/bin/cmake \
112-
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
113-
&& rm /tmp/cmake-install.sh
114-
115-
ENV PATH=/usr/bin/cmake/bin:${PATH}
116-
117118
# Install ESP-IDF
118119
ENV IDF_PATH=/sources/esp-idf
119120
ENV ESP_PATCH_VER=esp-2021r2-patch5-8.4.0

.devcontainer/sources/Dockerfile.AzureRTOS

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ RUN apt-get update \
44
&& apt-get install -y \
55
curl \
66
xz-utils \
7-
unzip
7+
unzip \
8+
wget
89

910
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz
1011
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
@@ -13,6 +14,14 @@ RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
1314
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
1415
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/
1516

17+
ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
18+
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
24+
1625
FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer
1726

1827
# Avoid warnings by switching to noninteractive
@@ -52,23 +61,15 @@ RUN git clone --branch mbedtls-2.28.1 https://github.com/ARMmbed/mbedtls.git --d
5261
&& git clone --branch R0.14b https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
5362
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs
5463

55-
ARG CMAKE_VERSION=3.24.0
56-
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
57-
-q -O /tmp/cmake-install.sh \
58-
&& chmod u+x /tmp/cmake-install.sh \
59-
&& mkdir /usr/bin/cmake \
60-
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
61-
&& rm /tmp/cmake-install.sh
62-
63-
ENV PATH=/usr/bin/cmake/bin:${PATH}
64-
6564
# set gcc location
6665
ENV ARM_GCC_PATH=/usr/local/bin/gcc
6766
ENV PATH=$ARM_GCC_PATH/bin:${PATH}
6867

6968
# Copy from our other container
7069
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
71-
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
70+
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
71+
72+
ENV PATH=/usr/bin/cmake/bin:${PATH}
7273

7374
# Putting hex2dfu in the container
7475
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu

.devcontainer/sources/Dockerfile.ChibiOS

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ RUN apt-get update \
44
&& apt-get install -y \
55
curl \
66
xz-utils \
7-
unzip
7+
unzip \
8+
wget
89

910
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz
1011
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
@@ -13,6 +14,14 @@ RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
1314
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
1415
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/
1516

17+
ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
18+
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
24+
1625
FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer
1726

1827
# Avoid warnings by switching to noninteractive
@@ -52,23 +61,15 @@ RUN git clone --branch mbedtls-2.28.1 https://github.com/ARMmbed/mbedtls.git --d
5261
&& git clone --branch R0.14b https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
5362
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs
5463

55-
ARG CMAKE_VERSION=3.24.0
56-
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
57-
-q -O /tmp/cmake-install.sh \
58-
&& chmod u+x /tmp/cmake-install.sh \
59-
&& mkdir /usr/bin/cmake \
60-
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
61-
&& rm /tmp/cmake-install.sh
62-
63-
ENV PATH=/usr/bin/cmake/bin:${PATH}
64-
6564
# set gcc location
6665
ENV ARM_GCC_PATH=/usr/local/bin/gcc
6766
ENV PATH=$ARM_GCC_PATH/bin:${PATH}
6867

6968
# Copy from our other container
7069
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
71-
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
70+
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
71+
72+
ENV PATH=/usr/bin/cmake/bin:${PATH}
7273

7374
# Putting hex2dfu in the container
7475
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu

.devcontainer/sources/Dockerfile.ESP32

+12-8
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ RUN apt-get update \
44
&& apt-get install -y \
55
curl \
66
bzip2 \
7-
unzip
7+
unzip \
8+
wget
89

910
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc
1011

12+
ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
13+
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
19+
1120
FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer
1221

1322
# Avoid warnings by switching to noninteractive
@@ -47,13 +56,8 @@ RUN git clone --branch v4.4.3 https://github.com/espressif/esp-idf --depth 1 --r
4756
RUN ln -fs /usr/bin/python3 /usr/bin/python \
4857
&& pip3 install pyserial
4958

50-
ARG CMAKE_VERSION=3.24.0
51-
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
52-
-q -O /tmp/cmake-install.sh \
53-
&& chmod u+x /tmp/cmake-install.sh \
54-
&& mkdir /usr/bin/cmake \
55-
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
56-
&& rm /tmp/cmake-install.sh
59+
# copy from our other container
60+
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
5761

5862
ENV PATH=/usr/bin/cmake/bin:${PATH}
5963

.devcontainer/sources/Dockerfile.TI

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ RUN apt-get update \
44
&& apt-get install -y \
55
curl \
66
xz-utils \
7-
unzip
7+
unzip \
8+
wget
9+
10+
ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
11+
RUN wget $CMAKE_SCRIPT \
12+
-q -O /tmp/cmake-install.sh \
13+
&& chmod u+x /tmp/cmake-install.sh \
14+
&& mkdir /tmp/dc-extracted/cmake \
15+
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
16+
&& rm /tmp/cmake-install.sh
817

918
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz
1019
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
@@ -52,24 +61,16 @@ RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC
5261
&& git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \
5362
&& chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh
5463

55-
ARG CMAKE_VERSION=3.24.0
56-
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
57-
-q -O /tmp/cmake-install.sh \
58-
&& chmod u+x /tmp/cmake-install.sh \
59-
&& mkdir /usr/bin/cmake \
60-
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
61-
&& rm /tmp/cmake-install.sh
62-
63-
ENV PATH=/usr/bin/cmake/bin:${PATH}
64-
6564
# set gcc location
6665
ENV ARM_GCC_PATH=/usr/local/bin/gcc
6766
ENV PATH=$ARM_GCC_PATH/bin:${PATH}
6867

6968
# Copy from our other container
7069
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
7170
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools
72-
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
71+
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
72+
73+
ENV PATH=/usr/bin/cmake/bin:${PATH}
7374

7475
# Clean up downloaded files
7576
RUN apt-get autoremove -y \

0 commit comments

Comments
 (0)