From 995a076262f924524b7423aa8d32812d968264ec Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 20 Oct 2018 15:24:16 +0100 Subject: [PATCH 1/8] Explicitly set noninteractive frontent --- tools/docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 9d15704ac..6c84ecabf 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -1,5 +1,7 @@ FROM 32bit/ubuntu:16.04 +ENV DEBIAN_FRONTEND noninteractive + # Tools RUN apt-get update && \ apt-get install -y --no-install-recommends \ From 20fa52997ca02626019f091608c9a604515be2dd Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 20 Oct 2018 15:25:02 +0100 Subject: [PATCH 2/8] Quiet wget --- tools/docker/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 6c84ecabf..38c04a90c 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -11,21 +11,21 @@ RUN apt-get update && \ && apt-get clean # Install ARM toolchain -RUN wget https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 && \ +RUN wget -nv https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 && \ tar xjf gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 -C /tmp/ && \ cp -f -r /tmp/gcc-arm-none-eabi-5_2-2015q4/* /usr/local/ && \ rm -rf /tmp/gcc-arm-none-eabi-* gcc-arm-none-eabi-*-linux.tar.bz2 # Install msp430 toolchain -RUN wget http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2 && \ +RUN wget -nv http://simonduq.github.io/resources/mspgcc-4.7.2-compiled.tar.bz2 && \ tar xjf mspgcc*.tar.bz2 -C /tmp/ && \ cp -f -r /tmp/msp430/* /usr/local/ && \ rm -rf /tmp/msp430 mspgcc*.tar.bz2 # Install NXP toolchain (partial, with binaries excluded. Download from nxp.com) -RUN wget http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part1.tar.bz2 && \ - wget http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part2.tar.bz2 && \ - wget http://simonduq.github.io/resources/jn516x-sdk-4163-1416.tar.bz2 && \ +RUN wget -nv http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part1.tar.bz2 && \ + wget -nv http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part2.tar.bz2 && \ + wget -nv http://simonduq.github.io/resources/jn516x-sdk-4163-1416.tar.bz2 && \ mkdir /tmp/jn516x-sdk /tmp/ba-elf-gcc && \ tar xjf jn516x-sdk-*.tar.bz2 -C /tmp/jn516x-sdk && \ tar xjf ba-elf-gcc-*part1.tar.bz2 -C /tmp/ba-elf-gcc && \ @@ -37,7 +37,7 @@ RUN wget http://simonduq.github.io/resources/ba-elf-gcc-4.7.4-part1.tar.bz2 && \ ENV PATH="/usr/ba-elf-gcc/bin:${PATH}" ## Install nRF52 SDK -RUN wget https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip && \ +RUN wget -nv https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip && \ mkdir /usr/nrf52-sdk && \ unzip nrf5_iot_sdk_3288530.zip -d /usr/nrf52-sdk && \ rm nrf5_iot_sdk_3288530.zip From d756cb6e48abad103752baf307bbec65b132fb65 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 20 Oct 2018 15:25:14 +0100 Subject: [PATCH 3/8] Quiet git clone --- tools/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 38c04a90c..27e476e61 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -90,7 +90,7 @@ RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E && sudo apt-get clean # Download, build and install Renode -RUN git clone https://github.com/renode/renode.git \ +RUN git clone --quiet https://github.com/renode/renode.git \ && cd ${HOME}/renode \ && git checkout v1.3 \ && ./build.sh From 3c9eafc83b7f53f43002e44647ecf60ed0a84b05 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 20 Oct 2018 15:25:40 +0100 Subject: [PATCH 4/8] Quiet pip output --- tools/docker/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 27e476e61..e4cb39037 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -46,9 +46,8 @@ ENV NRF52_SDK_ROOT /usr/nrf52-sdk # Install sphinx and sphinx_rtd_theme, required for building and testing the # readthedocs API documentation -RUN pip install --upgrade pip -RUN pip install setuptools -RUN pip install sphinx_rtd_theme sphinx +RUN pip -q install --upgrade pip +RUN pip -q install setuptools && pip -q install sphinx_rtd_theme sphinx # Create user, enable X forwarding, add to group dialout # -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix From 06ad0f26b3c2680e24683f99894e7c971f4a093e Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 20 Oct 2018 15:25:52 +0100 Subject: [PATCH 5/8] Quiet unzip --- tools/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index e4cb39037..bd6dd4821 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -39,7 +39,7 @@ ENV PATH="/usr/ba-elf-gcc/bin:${PATH}" ## Install nRF52 SDK RUN wget -nv https://developer.nordicsemi.com/nRF5_IoT_SDK/nRF5_IoT_SDK_v0.9.x/nrf5_iot_sdk_3288530.zip && \ mkdir /usr/nrf52-sdk && \ - unzip nrf5_iot_sdk_3288530.zip -d /usr/nrf52-sdk && \ + unzip -q nrf5_iot_sdk_3288530.zip -d /usr/nrf52-sdk && \ rm nrf5_iot_sdk_3288530.zip ENV NRF52_SDK_ROOT /usr/nrf52-sdk From b4684e3d5faec000f46db5e1062f81d565caec01 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 20 Oct 2018 15:26:37 +0100 Subject: [PATCH 6/8] Single docker RUN for all apt- and npm work. Quiet npm and run all of the above without sudo --- tools/docker/Dockerfile | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index bd6dd4821..8b156efb1 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -3,12 +3,20 @@ FROM 32bit/ubuntu:16.04 ENV DEBIAN_FRONTEND noninteractive # Tools -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - build-essential doxygen git wget unzip python-serial python-pip \ - default-jdk ant srecord iputils-tracepath rlwrap \ - mosquitto mosquitto-clients gdb \ - && apt-get clean +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ + echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list && \ + apt-get -qq update && \ + apt-get -qq -y --no-install-recommends install \ + build-essential doxygen git wget unzip python-serial python-pip \ + default-jdk ant srecord iputils-tracepath rlwrap \ + mosquitto mosquitto-clients gdb npm \ + mono-complete gksu libgtk2.0-0 screen uml-utilities gtk-sharp2 \ + libcanberra-gtk-module:i386 \ + && apt-get -qq clean + +# Install coap-cli +RUN npm -q install coap-cli -g \ + && sudo ln -s /usr/bin/nodejs /usr/bin/node # Install ARM toolchain RUN wget -nv https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2 && \ @@ -75,19 +83,6 @@ WORKDIR ${HOME} RUN echo "#!/bin/bash\nant -Dbasedir=${COOJA} -f ${COOJA}/build.xml run" > ${HOME}/cooja && \ chmod +x ${HOME}/cooja -# Install coap-cli -RUN sudo apt-get install -y npm \ - && sudo apt-get clean \ - && sudo npm install coap-cli -g \ - && sudo ln -s /usr/bin/nodejs /usr/bin/node - -# Install Mono and libcanberra-gtk:i386 (for Renode) -RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ - && echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list \ - && sudo apt-get update \ - && sudo apt-get install -y mono-complete gksu libgtk2.0-0 screen uml-utilities gtk-sharp2 libcanberra-gtk-module:i386 \ - && sudo apt-get clean - # Download, build and install Renode RUN git clone --quiet https://github.com/renode/renode.git \ && cd ${HOME}/renode \ From b25e7bedf93a54c2a4b30ba328ee1bd81fe08dff Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 20 Oct 2018 15:52:47 +0100 Subject: [PATCH 7/8] Redirect apt-get stdout to /dev/null --- tools/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 8b156efb1..634f85ea6 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -11,7 +11,7 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E03280 default-jdk ant srecord iputils-tracepath rlwrap \ mosquitto mosquitto-clients gdb npm \ mono-complete gksu libgtk2.0-0 screen uml-utilities gtk-sharp2 \ - libcanberra-gtk-module:i386 \ + libcanberra-gtk-module:i386 > /dev/null \ && apt-get -qq clean # Install coap-cli From 08141e6b9b74fff6b7528c3180a6681e7b855f18 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sun, 21 Oct 2018 12:33:58 +0100 Subject: [PATCH 8/8] Sort apt-get install packages, one package per line --- tools/docker/Dockerfile | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 634f85ea6..6eb9dbb17 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -7,11 +7,30 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E03280 echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list && \ apt-get -qq update && \ apt-get -qq -y --no-install-recommends install \ - build-essential doxygen git wget unzip python-serial python-pip \ - default-jdk ant srecord iputils-tracepath rlwrap \ - mosquitto mosquitto-clients gdb npm \ - mono-complete gksu libgtk2.0-0 screen uml-utilities gtk-sharp2 \ - libcanberra-gtk-module:i386 > /dev/null \ + ant \ + build-essential \ + default-jdk \ + doxygen \ + gdb \ + git \ + gksu \ + gtk-sharp2 \ + iputils-tracepath \ + libcanberra-gtk-module:i386 \ + libgtk2.0-0 \ + mono-complete \ + mosquitto \ + mosquitto-clients \ + npm \ + python-pip \ + python-serial \ + rlwrap \ + screen \ + srecord \ + uml-utilities \ + unzip \ + wget \ + > /dev/null \ && apt-get -qq clean # Install coap-cli