Commit 3c59d451ea1b9bb15d0f363569bdc3cd933866b1

Patrick Steinhardt 2019-08-02T12:34:10

docker: use "--no-install-recommends" to reduce build time Pass the flag "--no-install-recommends" to apt-get in order to trim down the number of packages installed, both reducing build time and image size. As this also causes some required packages to not be installed anymore, add these explicitly to the set of packages installed.

diff --git a/azure-pipelines/docker/bionic b/azure-pipelines/docker/bionic
index 7980b8e..f1d50c9 100644
--- a/azure-pipelines/docker/bionic
+++ b/azure-pipelines/docker/bionic
@@ -1,20 +1,23 @@
 ARG BASE
 FROM $BASE
 RUN apt-get update && \
-    apt-get install -y \
+    apt-get install -y --no-install-recommends \
         clang \
         cmake \
         curl \
+        gcc \
         git \
-        libcurl4 \
         libcurl4-openssl-dev \
+        libpcre3-dev \
         libssh2-1-dev \
         libssl-dev \
         libz-dev \
-        openjdk-11-jre-headless \
-        openssh-client \
+        make \
+        openjdk-8-jre-headless \
         openssh-server \
+        openssl \
         pkgconf \
+        python \
         valgrind \
         && \
     rm -rf /var/lib/apt/lists/*
diff --git a/azure-pipelines/docker/xenial b/azure-pipelines/docker/xenial
index 9326799..deded54 100644
--- a/azure-pipelines/docker/xenial
+++ b/azure-pipelines/docker/xenial
@@ -1,19 +1,23 @@
 ARG BASE
 FROM $BASE
 RUN apt-get update && \
-    apt-get install -y \
+    apt-get install -y --no-install-recommends \
         clang \
         cmake \
         curl \
+        gcc \
         git \
-        libcurl3 \
-        libcurl3-gnutls \
         libcurl4-gnutls-dev \
+        libpcre3-dev \
+        libssh2-1-dev \
         libssl-dev \
-        openjdk-8-jre \
-        openssh-client \
+        libz-dev \
+        make \
+        openjdk-8-jre-headless \
         openssh-server \
+        openssl \
         pkgconf \
+        python \
         valgrind \
         && \
     rm -rf /var/lib/apt/lists/*