Skip to content

Commit fd1691a

Browse files
authored
Merge pull request #147 from apple/swift-5.1
Swift 5.1 Release Dockerfile
2 parents 78d0a2d + 6659885 commit fd1691a

File tree

4 files changed

+208
-0
lines changed

4 files changed

+208
-0
lines changed

5.1/ubuntu/16.04/Dockerfile

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

5.1/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.1-release
21+
ARG SWIFT_VERSION=swift-5.1-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.1/ubuntu/18.04/Dockerfile

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

5.1/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.1-release
21+
ARG SWIFT_VERSION=swift-5.1-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)