Skip to content

Commit 5242049

Browse files
woody-applepull[bot]
authored andcommitted
Revert "Implement Docker best practices (#6373)" (#6387)
This reverts commit 3c9aec2.
1 parent 62a0ca9 commit 5242049

File tree

8 files changed

+124
-134
lines changed

8 files changed

+124
-134
lines changed

integrations/docker/images/chip-build-android/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ FROM connectedhomeip/chip-build:${VERSION}
66
# doesn't work with JDK 11.
77
RUN set -x \
88
&& apt-get update \
9-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
10-
openjdk-8-jdk=8u292-b10-0ubuntu1~20.04 \
11-
rsync=3.1.3-8 \
12-
swig=4.0.1-5build1 \
9+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
10+
openjdk-8-jdk \
11+
rsync \
12+
swig \
1313
&& rm -rf /var/lib/apt/lists/ \
1414
&& : # last line
1515

Original file line numberDiff line numberDiff line change
@@ -1,47 +1,44 @@
11
ARG VERSION=latest
22
FROM connectedhomeip/chip-build:${VERSION}
33

4-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
54
# Bazel
65
RUN set -x \
76
&& apt-get update \
8-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
9-
curl=7.68.0-1ubuntu2.5 gnupg=2.2.19-3ubuntu2.1 \
10-
&& curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/bazel.gpg \
7+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
8+
curl gnupg \
9+
&& curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg \
10+
&& mv bazel.gpg /etc/apt/trusted.gpg.d/ \
1111
&& echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
1212
&& apt-get update \
13-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
14-
bazel=4.0.0 \
15-
&& rm -rf /var/lib/apt/lists/ \
13+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
14+
bazel \
1615
&& : # aids diffs
1716

1817
# Docker
1918
RUN set -x \
2019
&& apt-get update \
21-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
22-
curl=7.68.0-1ubuntu2.5 gnupg-agent=2.2.19-3ubuntu2.1 apt-transport-https=2.0.5 ca-certificates=20210119~20.04.1 \
23-
software-properties-common=0.98.9.4 \
20+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
21+
curl gnupg-agent apt-transport-https ca-certificates \
22+
software-properties-common \
2423
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
2524
&& add-apt-repository \
2625
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
2726
&& apt-get update \
28-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
29-
docker-ce=5:20.10.6~3-0~ubuntu-focal docker-ce-cli=5:20.10.6~3-0~ubuntu-focal containerd.io=1.4.4-1 \
30-
&& rm -rf /var/lib/apt/lists/ \
27+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
28+
docker-ce docker-ce-cli containerd.io \
3129
&& : # aids diffs
3230

3331
# Other Cirque prereqs
3432
RUN set -x \
3533
&& apt-get update \
36-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
37-
sudo=1.8.31-1ubuntu1.2 socat=1.7.3.3-2 psmisc=23.3-1 tigervnc-standalone-server=1.10.1+dfsg-3 tigervnc-viewer=1.10.1+dfsg-3 \
38-
python3-pip=20.0.2-5ubuntu1.3 python3-venv=3.8.2-0ubuntu2 python3-setuptools=45.2.0-1 libdbus-glib-1-dev=0.110-5fakssync1 \
39-
uuid-runtime=2.34-0.1ubuntu9.1 libgirepository1.0-dev=1.64.1-1~ubuntu20.04.1 \
40-
&& rm -rf /var/lib/apt/lists/ \
34+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
35+
sudo socat psmisc tigervnc-standalone-server tigervnc-viewer \
36+
python3-pip python3-venv python3-setuptools libdbus-glib-1-dev \
37+
uuid-runtime libgirepository1.0-dev \
4138
&& : # aids diffs
4239

4340
COPY requirements_nogrpc.txt /requirements.txt
4441

4542
RUN set -x \
46-
&& pip3 install --no-cache-dir -r requirements.txt \
43+
&& pip3 install -r requirements.txt \
4744
&& : # aids diffs
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
ARG VERSION=latest
22
FROM connectedhomeip/chip-build:${VERSION}
33

4+
5+
6+
47
# GNU ARM Embedded toolchain, cross compiler for various platform builds
58
RUN set -x \
69
&& apt-get update \
7-
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
8-
gcc-arm-none-eabi=15:9-2019-q4-0ubuntu1 \
9-
binutils-arm-none-eabi=2.34-4ubuntu1+13ubuntu1 \
10-
ccache=3.7.7-1 \
11-
&& rm -rf /var/lib/apt/lists/ \
12-
&& : # last line
10+
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
11+
gcc-arm-none-eabi \
12+
binutils-arm-none-eabi \
13+
ccache

integrations/docker/images/chip-build-esp32-qemu/Dockerfile

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
ARG VERSION=latest
22
FROM connectedhomeip/chip-build-esp32:${VERSION}
33

4-
WORKDIR /opt/espressif/qemu
5-
64
# Setup QEMU emulator for ESP32 platform
75
RUN set -x \
8-
&& git clone --depth 1 --branch esp-develop-20210220 https://github.com/espressif/qemu.git /opt/espressif/qemu-src \
6+
&& mkdir -p /opt/espressif \
7+
&& git clone --progress --depth 1 --branch esp-develop-20210220 https://github.com/espressif/qemu.git /opt/espressif/qemu-src \
8+
&& mkdir -p /opt/espressif/qemu \
9+
&& (cd /opt/espressif/qemu \
910
&& ../qemu-src/configure --target-list=xtensa-softmmu --enable-debug --enable-sanitizers --disable-strip --disable-user --disable-capstone --disable-vnc --disable-sdl --disable-gtk \
10-
&& make -j8 \
11+
&& make -j8) \
1112
&& : # last line
1213

1314
ENV QEMU_ESP32_DIR=/opt/espressif/qemu

integrations/docker/images/chip-build-esp32/Dockerfile

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
ARG VERSION=latest
22
FROM connectedhomeip/chip-build:${VERSION}
33

4-
WORKDIR /opt/espressif/esp-idf
5-
64
# Setup the ESP-IDF
75
RUN set -x \
86
&& apt-get update \
9-
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
10-
python-is-python2=2.7.17-4 libgcrypt20-dev=1.8.5-5ubuntu1 \
11-
&& git clone --depth=1 -b release/v4.2 https://github.com/espressif/esp-idf.git /opt/espressif/esp-idf \
12-
&& git submodule update --init \
7+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python libgcrypt20-dev \
8+
&& mkdir -p /opt/espressif \
9+
&& cd /opt/espressif \
10+
&& git clone --progress -b release/v4.2 https://github.com/espressif/esp-idf.git \
11+
&& cd esp-idf \
12+
&& git submodule update --init --progress \
1313
&& IDF_TOOLS_PATH=/opt/espressif/tools ./install.sh \
14-
&& rm -rf /var/lib/apt/lists/ \
1514
&& : # last line
1615

1716
ENV IDF_PATH=/opt/espressif/esp-idf/
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
ARG VERSION=latest
22
FROM connectedhomeip/chip-build:${VERSION}
33

4-
WORKDIR /opt/sdk
5-
64
# Setup the K32W SDK
75
RUN set -x \
86
&& apt-get update \
9-
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
10-
wget=1.20.3-1ubuntu1 unzip=6.0-25ubuntu1 \
7+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip \
118
&& rm -rf /var/lib/apt/lists/ \
9+
&& mkdir -p /opt/sdk \
10+
&& cd /opt/sdk \
1211
&& wget https://mcuxpresso.nxp.com/eclipse/sdk/2.6.3/plugins/com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.3.201911251446.jar \
1312
&& unzip com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.3.201911251446.jar \
14-
&& unzip sdks/5faab205f2663647c5c7ce05c382d2a8.zip -d sdks/ \
15-
&& rm -f com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.3.201911251446.jar \
16-
&& rm -f sdk/5faab205f2663647c5c7ce05c382d2a8.zip \
13+
&& rm -rf com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.3.201911251446.jar \
14+
&& cd sdks \
15+
&& unzip 5faab205f2663647c5c7ce05c382d2a8.zip \
16+
&& rm -rf 5faab205f2663647c5c7ce05c382d2a8.zip \
1717
&& : # last line
1818

1919
ENV K32W061_SDK_ROOT=/opt/sdk/sdks

integrations/docker/images/chip-build-nrf-platform/Dockerfile

+11-15
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,44 @@ ARG NCS_REVISION=v1.5.0
88
# nRF Connect SDK dependencies
99
# ==================================================
1010

11-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
12-
13-
WORKDIR /opt/NordicSemiconductor/nRF5_tools/install
14-
1511
# Tools for building, flashing and accessing device logs
1612
RUN set -x \
1713
&& apt-get update \
18-
&& apt-get install --no-install-recommends -fy device-tree-compiler=1.5.1-1 \
14+
&& apt-get install --no-install-recommends -fy device-tree-compiler \
15+
&& (mkdir -p /opt/NordicSemiconductor/nRF5_tools/install && cd /opt/NordicSemiconductor/nRF5_tools/install \
1916
&& curl https://www.nordicsemi.com/-/media/Software-and-other-downloads/Desktop-software/nRF-command-line-tools/sw/Versions-10-x-x/10-12-1/nRFCommandLineTools10121Linuxamd64.tar.gz \
2017
| tar zxvf - \
21-
&& tar xvf JLink_Linux_V688a_x86_64.tgz -C /opt/NordicSemiconductor/nRF5_tools/ \
22-
&& tar xvf nRF-Command-Line-Tools_10_12_1.tar -C /opt/NordicSemiconductor/nRF5_tools/ \
23-
&& rm -rf ./install /var/lib/apt/lists/ \
18+
&& cd .. \
19+
&& tar xvf install/JLink_Linux_V688a_x86_64.tgz \
20+
&& tar xvf install/nRF-Command-Line-Tools_10_12_1.tar \
21+
&& rm -rf ./install /var/lib/apt/lists/) \
2422
&& : # last line
2523

2624
ENV NRF5_TOOLS_ROOT=/opt/NordicSemiconductor/nRF5_tools
2725
ENV PATH=${NRF5_TOOLS_ROOT}/JLink_Linux_V688a_x86_64:${PATH}
2826
ENV PATH=${NRF5_TOOLS_ROOT}/mergehex:${NRF5_TOOLS_ROOT}/nrfjprog:${PATH}
2927
ENV LD_LIBRARY_PATH=${NRF5_TOOLS_ROOT}/JLink_Linux_V688a_x86_64:${LD_LIBRARY_PATH}
3028

31-
WORKDIR /opt/ARM-software
32-
3329
# GNU ARM Embedded toolchain, cross compiler for various platform builds
3430
RUN set -x \
31+
&& (mkdir -p /opt/ARM-software && cd /opt/ARM-software \
3532
&& curl https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 \
36-
| tar jxvf - \
33+
| tar jxvf -) \
3734
&& : # last line
3835

3936
ENV ARM_GCC_INSTALL_ROOT=/opt/ARM-software/gcc-arm-none-eabi-9-2019-q4-major/bin/
4037

41-
WORKDIR /opt/NordicSemiconductor/nrfconnect
42-
4338
# ==================================================
4439
# nRF Connect SDK
4540
# ==================================================
4641
RUN set -x \
47-
&& python3 -m pip install -U --no-cache-dir pip==21.1 setuptools==56.0.0 wheel==0.36.2 cmake==3.18.4.post1 west==0.10.1 \
42+
&& (mkdir -p /opt/NordicSemiconductor/nrfconnect && cd /opt/NordicSemiconductor/nrfconnect \
43+
&& python3 -m pip install -U --no-cache-dir pip setuptools wheel cmake west \
4844
&& west init -m https://github.com/nrfconnect/sdk-nrf --mr $NCS_REVISION \
4945
&& west update \
5046
&& python3 -m pip install --no-cache-dir -r zephyr/scripts/requirements.txt \
5147
&& python3 -m pip install --no-cache-dir -r nrf/scripts/requirements.txt \
52-
&& python3 -m pip install --no-cache-dir -r bootloader/mcuboot/scripts/requirements.txt \
48+
&& python3 -m pip install --no-cache-dir -r bootloader/mcuboot/scripts/requirements.txt) \
5349
&& echo "source /opt/NordicSemiconductor/nrfconnect/zephyr/zephyr-env.sh" >> ~/.bashrc \
5450
&& : # last line
5551

0 commit comments

Comments
 (0)