@@ -8,48 +8,44 @@ ARG NCS_REVISION=v1.5.0
8
8
# nRF Connect SDK dependencies
9
9
# ==================================================
10
10
11
- SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
12
-
13
- WORKDIR /opt/NordicSemiconductor/nRF5_tools/install
14
-
15
11
# Tools for building, flashing and accessing device logs
16
12
RUN set -x \
17
13
&& 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 \
19
16
&& 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 \
20
17
| 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/) \
24
22
&& : # last line
25
23
26
24
ENV NRF5_TOOLS_ROOT=/opt/NordicSemiconductor/nRF5_tools
27
25
ENV PATH=${NRF5_TOOLS_ROOT}/JLink_Linux_V688a_x86_64:${PATH}
28
26
ENV PATH=${NRF5_TOOLS_ROOT}/mergehex:${NRF5_TOOLS_ROOT}/nrfjprog:${PATH}
29
27
ENV LD_LIBRARY_PATH=${NRF5_TOOLS_ROOT}/JLink_Linux_V688a_x86_64:${LD_LIBRARY_PATH}
30
28
31
- WORKDIR /opt/ARM-software
32
-
33
29
# GNU ARM Embedded toolchain, cross compiler for various platform builds
34
30
RUN set -x \
31
+ && (mkdir -p /opt/ARM-software && cd /opt/ARM-software \
35
32
&& 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 -) \
37
34
&& : # last line
38
35
39
36
ENV ARM_GCC_INSTALL_ROOT=/opt/ARM-software/gcc-arm-none-eabi-9-2019-q4-major/bin/
40
37
41
- WORKDIR /opt/NordicSemiconductor/nrfconnect
42
-
43
38
# ==================================================
44
39
# nRF Connect SDK
45
40
# ==================================================
46
41
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 \
48
44
&& west init -m https://github.com/nrfconnect/sdk-nrf --mr $NCS_REVISION \
49
45
&& west update \
50
46
&& python3 -m pip install --no-cache-dir -r zephyr/scripts/requirements.txt \
51
47
&& 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) \
53
49
&& echo "source /opt/NordicSemiconductor/nrfconnect/zephyr/zephyr-env.sh" >> ~/.bashrc \
54
50
&& : # last line
55
51
0 commit comments