Skip to content

Commit

Permalink
Fix install of CMake in dev container
Browse files Browse the repository at this point in the history
- Now downloading in download container.

***NO_CI***
  • Loading branch information
josesimoes committed Nov 21, 2022
1 parent 2b8c7ee commit 7e8caf7
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile.All
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-all:v2.28
FROM ghcr.io/nanoframework/dev-container-all:v2.29
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile.AzureRTOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.15
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.16
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile.ChibiOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-chibios:v1.15
FROM ghcr.io/nanoframework/dev-container-chibios:v1.16
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile.ESP32
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-esp32:v2.23
FROM ghcr.io/nanoframework/dev-container-esp32:v2.24
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile.TI
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-ti:v1.15
FROM ghcr.io/nanoframework/dev-container-ti:v1.16
25 changes: 13 additions & 12 deletions .devcontainer/sources/Dockerfile.All
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ RUN apt-get update \
&& apt-get install -y \
curl \
xz-utils \
unzip
unzip \
wget

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
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
Expand All @@ -19,6 +20,14 @@ RUN mkdir -p /tmp/dc-extracted/titools \
&& curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \
&& unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip

ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
RUN wget $CMAKE_SCRIPT \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /tmp/dc-extracted/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
&& rm /tmp/cmake-install.sh

FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer

# Avoid warnings by switching to noninteractive
Expand Down Expand Up @@ -90,7 +99,9 @@ ENV PATH=$ARM_GCC_PATH/bin:${PATH}
# Copy from our other container
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake

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

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

ARG CMAKE_VERSION=3.24.0
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /usr/bin/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
&& rm /tmp/cmake-install.sh

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

# Install ESP-IDF
ENV IDF_PATH=/sources/esp-idf
ENV ESP_PATCH_VER=esp-2021r2-patch5-8.4.0
Expand Down
25 changes: 13 additions & 12 deletions .devcontainer/sources/Dockerfile.AzureRTOS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ RUN apt-get update \
&& apt-get install -y \
curl \
xz-utils \
unzip
unzip \
wget

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
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
Expand All @@ -13,6 +14,14 @@ RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/

ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
RUN wget $CMAKE_SCRIPT \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /tmp/dc-extracted/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
&& rm /tmp/cmake-install.sh

FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer

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

ARG CMAKE_VERSION=3.24.0
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /usr/bin/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
&& rm /tmp/cmake-install.sh

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

# set gcc location
ENV ARM_GCC_PATH=/usr/local/bin/gcc
ENV PATH=$ARM_GCC_PATH/bin:${PATH}

# Copy from our other container
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake

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

# Putting hex2dfu in the container
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu
Expand Down
25 changes: 13 additions & 12 deletions .devcontainer/sources/Dockerfile.ChibiOS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ RUN apt-get update \
&& apt-get install -y \
curl \
xz-utils \
unzip
unzip \
wget

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
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
Expand All @@ -13,6 +14,14 @@ RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/

ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
RUN wget $CMAKE_SCRIPT \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /tmp/dc-extracted/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
&& rm /tmp/cmake-install.sh

FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer

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

ARG CMAKE_VERSION=3.24.0
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /usr/bin/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
&& rm /tmp/cmake-install.sh

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

# set gcc location
ENV ARM_GCC_PATH=/usr/local/bin/gcc
ENV PATH=$ARM_GCC_PATH/bin:${PATH}

# Copy from our other container
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake

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

# Putting hex2dfu in the container
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu
Expand Down
20 changes: 12 additions & 8 deletions .devcontainer/sources/Dockerfile.ESP32
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ RUN apt-get update \
&& apt-get install -y \
curl \
bzip2 \
unzip
unzip \
wget

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

ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
RUN wget $CMAKE_SCRIPT \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /tmp/dc-extracted/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
&& rm /tmp/cmake-install.sh

FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer

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

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

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

Expand Down
25 changes: 13 additions & 12 deletions .devcontainer/sources/Dockerfile.TI
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ RUN apt-get update \
&& apt-get install -y \
curl \
xz-utils \
unzip
unzip \
wget

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
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
Expand All @@ -19,6 +20,14 @@ RUN mkdir -p /tmp/dc-extracted/titools \
&& curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \
&& unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip

ARG CMAKE_SCRIPT=https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh
RUN wget $CMAKE_SCRIPT \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /tmp/dc-extracted/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
&& rm /tmp/cmake-install.sh

FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer

# Avoid warnings by switching to noninteractive
Expand Down Expand Up @@ -52,24 +61,16 @@ RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC
&& git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \
&& chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh

ARG CMAKE_VERSION=3.24.0
RUN wget https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /usr/bin/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
&& rm /tmp/cmake-install.sh

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

# set gcc location
ENV ARM_GCC_PATH=/usr/local/bin/gcc
ENV PATH=$ARM_GCC_PATH/bin:${PATH}

# Copy from our other container
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake

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

# Clean up downloaded files
RUN apt-get autoremove -y \
Expand Down

0 comments on commit 7e8caf7

Please sign in to comment.