Skip to content

Commit 6b02e77

Browse files
authored
Merge pull request #161 from apple/swift-5.2
Add Swift 5.2 Dockerfiles
2 parents 05538e1 + 5a513a7 commit 6b02e77

File tree

4 files changed

+210
-0
lines changed

4 files changed

+210
-0
lines changed

5.2/ubuntu/16.04/Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM ubuntu:16.04
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL Description="Docker Container for the Swift programming language"
4+
5+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
6+
apt-get -q install -y \
7+
libatomic1 \
8+
libcurl3 \
9+
libxml2 \
10+
libedit2 \
11+
libsqlite3-0 \
12+
libc6-dev \
13+
binutils \
14+
libgcc-5-dev \
15+
libstdc++-5-dev \
16+
zlib1g-dev \
17+
libpython2.7 \
18+
tzdata \
19+
git \
20+
pkg-config \
21+
&& rm -r /var/lib/apt/lists/*
22+
23+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
24+
25+
# pub 4096R/ED3D1561 2019-03-22 [expires: 2021-03-21]
26+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
27+
# uid Swift 5.x Release Signing Key <[email protected]
28+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
29+
ARG SWIFT_PLATFORM=ubuntu16.04
30+
ARG SWIFT_BRANCH=swift-5.2-release
31+
ARG SWIFT_VERSION=swift-5.2-RELEASE
32+
ARG SWIFT_WEBROOT=https://swift.org/builds/
33+
34+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
35+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
36+
SWIFT_BRANCH=$SWIFT_BRANCH \
37+
SWIFT_VERSION=$SWIFT_VERSION \
38+
SWIFT_WEBROOT=$SWIFT_WEBROOT
39+
40+
RUN set -e; \
41+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)/" \
42+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
43+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
44+
# - Grab curl here so we cache better up above
45+
&& export DEBIAN_FRONTEND=noninteractive \
46+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
47+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
48+
&& export GNUPGHOME="$(mktemp -d)" \
49+
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
50+
&& gpg --batch --quiet --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
51+
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
52+
# - Unpack the toolchain, set libs permissions, and clean up.
53+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 \
54+
&& chmod -R o+r /usr/lib/swift \
55+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
56+
&& apt-get purge --auto-remove -y curl
57+
58+
# Print Installed Swift Version
59+
RUN swift --version

5.2/ubuntu/16.04/slim/Dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM ubuntu:16.04
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL Description="Docker Container for the Swift programming language"
4+
5+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
6+
apt-get -q install -y \
7+
libatomic1 \
8+
libcurl3 \
9+
libxml2 \
10+
tzdata \
11+
&& rm -r /var/lib/apt/lists/*
12+
13+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
14+
15+
# pub 4096R/ED3D1561 2019-03-22 [expires: 2021-03-21]
16+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
17+
# uid Swift 5.x Release Signing Key <[email protected]
18+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
19+
ARG SWIFT_PLATFORM=ubuntu16.04
20+
ARG SWIFT_BRANCH=swift-5.2-release
21+
ARG SWIFT_VERSION=swift-5.2-RELEASE
22+
ARG SWIFT_WEBROOT=https://swift.org/builds/
23+
24+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
25+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
26+
SWIFT_BRANCH=$SWIFT_BRANCH \
27+
SWIFT_VERSION=$SWIFT_VERSION \
28+
SWIFT_WEBROOT=$SWIFT_WEBROOT
29+
30+
RUN set -e; \
31+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)/" \
32+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
33+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
34+
# - Grab curl here so we cache better up above
35+
&& export DEBIAN_FRONTEND=noninteractive \
36+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
37+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
38+
&& export GNUPGHOME="$(mktemp -d)" \
39+
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
40+
&& gpg --batch --quiet --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
41+
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
42+
# - Unpack the toolchain, set libs permissions, and clean up.
43+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 $SWIFT_VERSION-$SWIFT_PLATFORM/usr/lib/swift/linux \
44+
&& chmod -R o+r /usr/lib/swift \
45+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
46+
&& apt-get purge --auto-remove -y curl

5.2/ubuntu/18.04/Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM ubuntu:18.04
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL Description="Docker Container for the Swift programming language"
4+
5+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
6+
apt-get -q install -y \
7+
libatomic1 \
8+
libcurl4 \
9+
libxml2 \
10+
libedit2 \
11+
libsqlite3-0 \
12+
libc6-dev \
13+
binutils \
14+
libgcc-5-dev \
15+
libstdc++-5-dev \
16+
zlib1g-dev \
17+
libpython2.7 \
18+
tzdata \
19+
git \
20+
pkg-config \
21+
&& rm -r /var/lib/apt/lists/*
22+
23+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
24+
25+
# pub 4096R/ED3D1561 2019-03-22 [expires: 2021-03-21]
26+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
27+
# uid Swift 5.x Release Signing Key <[email protected]
28+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
29+
ARG SWIFT_PLATFORM=ubuntu18.04
30+
ARG SWIFT_BRANCH=swift-5.2-release
31+
ARG SWIFT_VERSION=swift-5.2-RELEASE
32+
ARG SWIFT_WEBROOT=https://swift.org/builds/
33+
34+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
35+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
36+
SWIFT_BRANCH=$SWIFT_BRANCH \
37+
SWIFT_VERSION=$SWIFT_VERSION \
38+
SWIFT_WEBROOT=$SWIFT_WEBROOT
39+
40+
RUN set -e; \
41+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)/" \
42+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
43+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
44+
# - Grab curl here so we cache better up above
45+
&& export DEBIAN_FRONTEND=noninteractive \
46+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
47+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
48+
&& export GNUPGHOME="$(mktemp -d)" \
49+
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
50+
&& gpg --batch --quiet --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
51+
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
52+
# - Unpack the toolchain, set libs permissions, and clean up.
53+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 \
54+
&& chmod -R o+r /usr/lib/swift \
55+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
56+
&& apt-get purge --auto-remove -y curl
57+
58+
# Print Installed Swift Version
59+
RUN swift --version

5.2/ubuntu/18.04/slim/Dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM ubuntu:18.04
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL Description="Docker Container for the Swift programming language"
4+
5+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
6+
apt-get -q install -y \
7+
libatomic1 \
8+
libcurl4 \
9+
libxml2 \
10+
tzdata \
11+
&& rm -r /var/lib/apt/lists/*
12+
13+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
14+
15+
# pub 4096R/ED3D1561 2019-03-22 [expires: 2021-03-21]
16+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
17+
# uid Swift 5.x Release Signing Key <[email protected]
18+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
19+
ARG SWIFT_PLATFORM=ubuntu18.04
20+
ARG SWIFT_BRANCH=swift-5.2-release
21+
ARG SWIFT_VERSION=swift-5.2-RELEASE
22+
ARG SWIFT_WEBROOT=https://swift.org/builds/
23+
24+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
25+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
26+
SWIFT_BRANCH=$SWIFT_BRANCH \
27+
SWIFT_VERSION=$SWIFT_VERSION \
28+
SWIFT_WEBROOT=$SWIFT_WEBROOT
29+
30+
RUN set -e; \
31+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)/" \
32+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
33+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
34+
# - Grab curl and gpg here so we cache better up above
35+
&& export DEBIAN_FRONTEND=noninteractive \
36+
&& apt-get -q update && apt-get -q install -y curl gnupg && rm -rf /var/lib/apt/lists/* \
37+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
38+
&& export GNUPGHOME="$(mktemp -d)" \
39+
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
40+
&& gpg --batch --quiet --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
41+
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
42+
# - Unpack the toolchain, set libs permissions, and clean up.
43+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 $SWIFT_VERSION-$SWIFT_PLATFORM/usr/lib/swift/linux \
44+
&& chmod -R o+r /usr/lib/swift \
45+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
46+
&& apt-get purge --auto-remove -y curl gnupg

0 commit comments

Comments
 (0)