Skip to content

Commit 3c59d45

Browse files
committed
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.
1 parent 39b7e8b commit 3c59d45

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

azure-pipelines/docker/bionic

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
ARG BASE
22
FROM $BASE
33
RUN apt-get update && \
4-
apt-get install -y \
4+
apt-get install -y --no-install-recommends \
55
clang \
66
cmake \
77
curl \
8+
gcc \
89
git \
9-
libcurl4 \
1010
libcurl4-openssl-dev \
11+
libpcre3-dev \
1112
libssh2-1-dev \
1213
libssl-dev \
1314
libz-dev \
14-
openjdk-11-jre-headless \
15-
openssh-client \
15+
make \
16+
openjdk-8-jre-headless \
1617
openssh-server \
18+
openssl \
1719
pkgconf \
20+
python \
1821
valgrind \
1922
&& \
2023
rm -rf /var/lib/apt/lists/*

azure-pipelines/docker/xenial

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
ARG BASE
22
FROM $BASE
33
RUN apt-get update && \
4-
apt-get install -y \
4+
apt-get install -y --no-install-recommends \
55
clang \
66
cmake \
77
curl \
8+
gcc \
89
git \
9-
libcurl3 \
10-
libcurl3-gnutls \
1110
libcurl4-gnutls-dev \
11+
libpcre3-dev \
12+
libssh2-1-dev \
1213
libssl-dev \
13-
openjdk-8-jre \
14-
openssh-client \
14+
libz-dev \
15+
make \
16+
openjdk-8-jre-headless \
1517
openssh-server \
18+
openssl \
1619
pkgconf \
20+
python \
1721
valgrind \
1822
&& \
1923
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)