Skip to content

Commit 5d771d7

Browse files
authored
Add support for Swift 5.7 Release (swiftlang#312)
* Add support for Swift 5.7 Release * Fix the ci_test script * Fix typo in the build-args flag * Move the check for Windows
1 parent c609a15 commit 5d771d7

File tree

13 files changed

+669
-3
lines changed

13 files changed

+669
-3
lines changed

5.7/amazonlinux/2/Dockerfile

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
FROM amazonlinux:2
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL description="Docker Container for the Swift programming language"
4+
5+
RUN yum -y install \
6+
binutils \
7+
gcc \
8+
git \
9+
unzip \
10+
glibc-static \
11+
gzip \
12+
libbsd \
13+
libcurl-devel \
14+
libedit \
15+
libicu \
16+
libsqlite \
17+
libstdc++-static \
18+
libuuid \
19+
libxml2-devel \
20+
tar \
21+
tzdata \
22+
zlib-devel
23+
24+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
25+
26+
# pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
27+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
28+
# uid Swift 5.x Release Signing Key <[email protected]
29+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
30+
ARG SWIFT_PLATFORM=amazonlinux2
31+
ARG SWIFT_BRANCH=swift-5.7-release
32+
ARG SWIFT_VERSION=swift-5.7-RELEASE
33+
ARG SWIFT_WEBROOT=https://download.swift.org
34+
35+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
36+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
37+
SWIFT_BRANCH=$SWIFT_BRANCH \
38+
SWIFT_VERSION=$SWIFT_VERSION \
39+
SWIFT_WEBROOT=$SWIFT_WEBROOT
40+
41+
RUN set -e; \
42+
ARCH_NAME="$(rpm --eval '%{_arch}')"; \
43+
url=; \
44+
case "${ARCH_NAME##*-}" in \
45+
'x86_64') \
46+
OS_ARCH_SUFFIX=''; \
47+
;; \
48+
'aarch64') \
49+
OS_ARCH_SUFFIX='-aarch64'; \
50+
;; \
51+
*) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \
52+
esac; \
53+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \
54+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \
55+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
56+
&& echo $SWIFT_BIN_URL \
57+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
58+
&& export GNUPGHOME="$(mktemp -d)" \
59+
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
60+
&& gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \
61+
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
62+
# - Unpack the toolchain, set libs permissions, and clean up.
63+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 \
64+
&& chmod -R o+r /usr/lib/swift \
65+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz
66+
67+
# Print Installed Swift Version
68+
RUN swift --version

5.7/amazonlinux/2/slim/Dockerfile

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM amazonlinux:2
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL description="Docker Container for the Swift programming language"
4+
5+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
6+
7+
# pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
8+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
9+
# uid Swift 5.x Release Signing Key <[email protected]
10+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
11+
ARG SWIFT_PLATFORM=amazonlinux2
12+
ARG SWIFT_BRANCH=swift-5.7-release
13+
ARG SWIFT_VERSION=swift-5.7-RELEASE
14+
ARG SWIFT_WEBROOT=https://download.swift.org
15+
16+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
17+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
18+
SWIFT_BRANCH=$SWIFT_BRANCH \
19+
SWIFT_VERSION=$SWIFT_VERSION \
20+
SWIFT_WEBROOT=$SWIFT_WEBROOT
21+
22+
RUN set -e; \
23+
ARCH_NAME="$(rpm --eval '%{_arch}')"; \
24+
url=; \
25+
case "${ARCH_NAME##*-}" in \
26+
'x86_64') \
27+
OS_ARCH_SUFFIX=''; \
28+
;; \
29+
'aarch64') \
30+
OS_ARCH_SUFFIX='-aarch64'; \
31+
;; \
32+
*) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \
33+
esac; \
34+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \
35+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \
36+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
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 keyserver.ubuntu.com --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+
&& yum -y install tar gzip \
44+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \
45+
&& chmod -R o+r /usr/lib/swift \
46+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
47+
&& yum autoremove -y tar gzip

5.7/centos/7/Dockerfile

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM centos:7
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL description="Docker Container for the Swift programming language"
4+
5+
RUN yum install shadow-utils.x86_64 -y \
6+
binutils \
7+
gcc \
8+
git \
9+
unzip \
10+
glibc-static \
11+
libbsd-devel \
12+
libcurl-devel \
13+
libedit \
14+
libedit-devel \
15+
libicu-devel \
16+
libstdc++-static \
17+
libxml2-devel \
18+
pkg-config \
19+
python3 \
20+
sqlite \
21+
zlib-devel
22+
23+
RUN sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h
24+
25+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
26+
27+
# pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
28+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
29+
# uid Swift 5.x Release Signing Key <[email protected]
30+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
31+
ARG SWIFT_PLATFORM=centos7
32+
ARG SWIFT_BRANCH=swift-5.7-release
33+
ARG SWIFT_VERSION=swift-5.7-RELEASE
34+
ARG SWIFT_WEBROOT=https://download.swift.org
35+
36+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
37+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
38+
SWIFT_BRANCH=$SWIFT_BRANCH \
39+
SWIFT_VERSION=$SWIFT_VERSION \
40+
SWIFT_WEBROOT=$SWIFT_WEBROOT
41+
42+
RUN set -e; \
43+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)" \
44+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
45+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
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 keyserver.ubuntu.com --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+
56+
# Print Installed Swift Version
57+
RUN swift --version

5.7/centos/7/slim/Dockerfile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM centos:7
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL description="Docker Container for the Swift programming language"
4+
5+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
6+
7+
# pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
8+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
9+
# uid Swift 5.x Release Signing Key <[email protected]
10+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
11+
ARG SWIFT_PLATFORM=centos7
12+
ARG SWIFT_BRANCH=swift-5.7-release
13+
ARG SWIFT_VERSION=swift-5.7-RELEASE
14+
ARG SWIFT_WEBROOT=https://download.swift.org
15+
16+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
17+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
18+
SWIFT_BRANCH=$SWIFT_BRANCH \
19+
SWIFT_VERSION=$SWIFT_VERSION \
20+
SWIFT_WEBROOT=$SWIFT_WEBROOT
21+
22+
RUN set -e; \
23+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)" \
24+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM.tar.gz" \
25+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
26+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
27+
&& export GNUPGHOME="$(mktemp -d)" \
28+
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
29+
&& gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \
30+
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
31+
# - Unpack the toolchain, set libs permissions, and clean up.
32+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 $SWIFT_VERSION-$SWIFT_PLATFORM/usr/lib/swift/linux \
33+
&& chmod -R o+r /usr/lib/swift \
34+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz

5.7/ubuntu/18.04/Dockerfile

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

5.7/ubuntu/18.04/slim/Dockerfile

+46
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 [SC] [expires: 2023-03-23]
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.7-release
21+
ARG SWIFT_VERSION=swift-5.7-RELEASE
22+
ARG SWIFT_WEBROOT=https://download.swift.org
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 keyserver.ubuntu.com --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

5.7/ubuntu/20.04/Dockerfile

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
FROM ubuntu:20.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+
binutils \
8+
git \
9+
unzip \
10+
gnupg2 \
11+
libc6-dev \
12+
libcurl4-openssl-dev \
13+
libedit2 \
14+
libgcc-9-dev \
15+
libpython3.8 \
16+
libsqlite3-0 \
17+
libstdc++-9-dev \
18+
libxml2-dev \
19+
libz3-dev \
20+
pkg-config \
21+
tzdata \
22+
zlib1g-dev \
23+
&& rm -r /var/lib/apt/lists/*
24+
25+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
26+
27+
# pub 4096R/ED3D1561 2019-03-22 [SC] [expires: 2023-03-23]
28+
# Key fingerprint = A62A E125 BBBF BB96 A6E0 42EC 925C C1CC ED3D 1561
29+
# uid Swift 5.x Release Signing Key <[email protected]
30+
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
31+
ARG SWIFT_PLATFORM=ubuntu20.04
32+
ARG SWIFT_BRANCH=swift-5.7-release
33+
ARG SWIFT_VERSION=swift-5.7-RELEASE
34+
ARG SWIFT_WEBROOT=https://download.swift.org
35+
36+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
37+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
38+
SWIFT_BRANCH=$SWIFT_BRANCH \
39+
SWIFT_VERSION=$SWIFT_VERSION \
40+
SWIFT_WEBROOT=$SWIFT_WEBROOT
41+
42+
RUN set -e; \
43+
ARCH_NAME="$(dpkg --print-architecture)"; \
44+
url=; \
45+
case "${ARCH_NAME##*-}" in \
46+
'amd64') \
47+
OS_ARCH_SUFFIX=''; \
48+
;; \
49+
'arm64') \
50+
OS_ARCH_SUFFIX='-aarch64'; \
51+
;; \
52+
*) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \
53+
esac; \
54+
SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \
55+
&& SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \
56+
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \
57+
# - Grab curl here so we cache better up above
58+
&& export DEBIAN_FRONTEND=noninteractive \
59+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
60+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
61+
&& export GNUPGHOME="$(mktemp -d)" \
62+
&& curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \
63+
&& gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \
64+
&& gpg --batch --verify swift.tar.gz.sig swift.tar.gz \
65+
# - Unpack the toolchain, set libs permissions, and clean up.
66+
&& tar -xzf swift.tar.gz --directory / --strip-components=1 \
67+
&& chmod -R o+r /usr/lib/swift \
68+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
69+
&& apt-get purge --auto-remove -y curl
70+
71+
# Print Installed Swift Version
72+
RUN swift --version

0 commit comments

Comments
 (0)