Skip to content

Commit 55b8e31

Browse files
authored
Merge pull request #135 from ianpartridge/5.0-size-reduction
5.0: optimise installed packages
2 parents 0d3ffbb + 966cfde commit 55b8e31

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

5.0/ubuntu/16.04/Dockerfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ FROM ubuntu:16.04
22
LABEL maintainer="Swift Infrastructure <[email protected]>"
33
LABEL Description="Docker Container for the Swift programming language"
44

5-
# Install related packages and set LLVM 3.8 as the compiler
65
RUN apt-get -q update && \
76
apt-get -q install -y \
8-
make \
7+
libatomic1 \
8+
libbsd0 \
9+
libcurl3 \
10+
libxml2 \
11+
libedit2 \
12+
libsqlite3-0 \
913
libc6-dev \
10-
clang-3.8 \
11-
curl \
12-
libedit-dev \
14+
binutils \
15+
libgcc-5-dev \
16+
libstdc++-5-dev \
1317
libpython2.7 \
14-
libicu-dev \
15-
libssl-dev \
16-
libxml2 \
1718
tzdata \
1819
git \
19-
libcurl4-openssl-dev \
2020
pkg-config \
21-
&& update-alternatives --quiet --install /usr/bin/clang clang /usr/bin/clang-3.8 100 \
22-
&& update-alternatives --quiet --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100 \
2321
&& rm -r /var/lib/apt/lists/*
2422

2523
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
@@ -33,8 +31,12 @@ ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \
3331

3432
# Download GPG keys, signature and Swift package, then unpack, cleanup and execute permissions for foundation libs
3533
RUN SWIFT_URL=https://swift.org/builds/$SWIFT_BRANCH/$(echo "$SWIFT_PLATFORM" | tr -d .)/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz \
34+
&& apt-get -q update \
35+
&& apt-get -q install -y curl \
3636
&& curl -fSsL $SWIFT_URL -o swift.tar.gz \
3737
&& curl -fSsL $SWIFT_URL.sig -o swift.tar.gz.sig \
38+
&& apt-get purge -y curl \
39+
&& apt-get -y autoremove \
3840
&& export GNUPGHOME="$(mktemp -d)" \
3941
&& set -e; \
4042
for key in \

5.0/ubuntu/18.04/Dockerfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ FROM ubuntu:18.04
22
LABEL maintainer="Swift Infrastructure <[email protected]>"
33
LABEL Description="Docker Container for the Swift programming language"
44

5-
# Install related packages and set LLVM 3.9 as the compiler
65
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
76
apt-get -q install -y \
8-
make \
7+
libatomic1 \
8+
libbsd0 \
9+
libcurl4 \
10+
libxml2 \
11+
libedit2 \
12+
libsqlite3-0 \
913
libc6-dev \
10-
clang-3.9 \
11-
curl \
12-
libedit-dev \
14+
binutils \
15+
libgcc-5-dev \
16+
libstdc++-5-dev \
1317
libpython2.7 \
14-
libicu-dev \
15-
libssl-dev \
16-
libxml2 \
1718
tzdata \
1819
git \
19-
libcurl4-openssl-dev \
2020
pkg-config \
21-
&& update-alternatives --quiet --install /usr/bin/clang clang /usr/bin/clang-3.9 100 \
22-
&& update-alternatives --quiet --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100 \
2321
&& rm -r /var/lib/apt/lists/*
2422

2523
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
@@ -33,8 +31,12 @@ ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \
3331

3432
# Download GPG keys, signature and Swift package, then unpack, cleanup and execute permissions for foundation libs
3533
RUN SWIFT_URL=https://swift.org/builds/$SWIFT_BRANCH/$(echo "$SWIFT_PLATFORM" | tr -d .)/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz \
34+
&& apt-get update \
35+
&& apt-get install -y curl \
3636
&& curl -fSsL $SWIFT_URL -o swift.tar.gz \
3737
&& curl -fSsL $SWIFT_URL.sig -o swift.tar.gz.sig \
38+
&& apt-get purge -y curl \
39+
&& apt-get -y autoremove \
3840
&& export GNUPGHOME="$(mktemp -d)" \
3941
&& set -e; \
4042
for key in \

0 commit comments

Comments
 (0)