diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e714b38d3e5031..5f999e2949b82c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,7 @@ +ARG BUILD_VERSION + # All tools required for compilation belong in chip-build, forms "truth" for CHIP build tooling -FROM connectedhomeip/chip-build +FROM connectedhomeip/chip-build:${BUILD_VERSION} # This Dockerfile contains things useful for an interactive development environment ARG USERNAME=vscode diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fe4a95bcc6b83a..fd98bad31a4138 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,12 @@ { "name": "CHIP Ubuntu Development Environment", - "dockerFile": "Dockerfile", + "build": { + "dockerfile": "Dockerfile", + "args": { + // "BUILD_VERSION": "$(cat integrations/docker/images/chip-build/version)" // trying to get this to work + "BUILD_VERSION": "0.2.7" + } + }, "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", @@ -9,16 +15,16 @@ "remoteUser": "vscode", // Add the IDs of extensions you want installed when the container is created in the array below. "extensions": [ - "ms-azuretools.vscode-docker", - "xaver.clang-format", - "github.vscode-pull-request-github", - "maelvalais.autoconf", - "yzhang.markdown-all-in-one", - "eamodio.gitlens", - "yuichinukiyama.vscode-preview-server", - "aaron-bond.better-comments", - "foxundermoon.shell-format" - ], + "ms-azuretools.vscode-docker", + "xaver.clang-format", + "github.vscode-pull-request-github", + "maelvalais.autoconf", + "yzhang.markdown-all-in-one", + "eamodio.gitlens", + "yuichinukiyama.vscode-preview-server", + "aaron-bond.better-comments", + "foxundermoon.shell-format" + ], // Use 'settings' to set *default* container specific settings.json values on container create. // You can edit these settings after create using File > Preferences > Settings > Remote. "settings": { diff --git a/integrations/docker/images/chip-build/Dockerfile b/integrations/docker/images/chip-build/Dockerfile index e97009a36416d4..fb4d99101a282c 100644 --- a/integrations/docker/images/chip-build/Dockerfile +++ b/integrations/docker/images/chip-build/Dockerfile @@ -7,24 +7,25 @@ VOLUME "/var/source" RUN set -x \ && apt-get update \ && apt-get install -fy \ - git \ - curl \ - jq \ - make \ - autoconf \ - automake \ - libtool \ - pkg-config \ - g++ \ - clang-9 \ - clang-format-9 \ - clang-tidy-9 \ - lcov \ - shellcheck \ - libssl-dev \ - unzip \ - wget \ - libmbedtls-dev \ + git \ + curl \ + jq \ + make \ + autoconf \ + automake \ + libtool \ + pkg-config \ + g++ \ + clang-9 \ + clang-format-9 \ + clang-tidy-9 \ + lcov \ + shellcheck \ + libssl-dev \ + unzip \ + wget \ + libmbedtls-dev \ + && rm -rf /var/lib/apt/lists/ \ && : # last line # Install specific release of openssl @@ -32,6 +33,7 @@ RUN set -x \ && cd /tmp && wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1f.zip \ && mkdir -p /tmp/openssl && cd /tmp/openssl && unzip ../OpenSSL_1_1_1f.zip \ && cd /tmp/openssl/openssl-OpenSSL_1_1_1f && ./config && make && make install \ + && rm -rf /tmp/OpenSSL_1_1_1f.zip \ && : # last line # nRF5 SDK, needed for building Nordic Platform code @@ -41,6 +43,7 @@ RUN set -x \ && (mkdir /var/nRF5_SDK_for_Thread_and_Zigbee \ && cd /var/nRF5_SDK_for_Thread_and_Zigbee \ && unzip /tmp/nRF5SDKforThreadandZigbee.zip) \ + && rm -rf /tmp/nRF5SDKforThreadandZigbee.zip \ && : # last line # Tools for flashing software on Nordic devices, and accessing device logs @@ -51,6 +54,8 @@ RUN set -x \ && dpkg -i JLink_Linux_*.deb \ && dpkg -i nRF-Command-Line-Tools_*.deb \ && tar zxvf nRF-Command-Line-Tools_*.tar.gz) \ + && rm -rf /var/nRF5_tools/*.tar.gz \ + && rm -rf /var/nRF5_tools/*.deb \ && : # last line # GNU ARM Embedded toolchain, cross compiler for various platform builds diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 53a75d673557d5..b0032849c80b52 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.2.6 +0.2.7