Skip to content

Commit 51a8821

Browse files
committed
Add nightly Swift 5.7 Dockerfiles
1 parent 594ab4b commit 51a8821

File tree

10 files changed

+672
-0
lines changed

10 files changed

+672
-0
lines changed

nightly-5.7/amazonlinux/2/Dockerfile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
glibc-static \
10+
gzip \
11+
libbsd \
12+
libcurl-devel \
13+
libedit \
14+
libicu \
15+
libsqlite \
16+
libstdc++-static \
17+
libuuid \
18+
libxml2-devel \
19+
tar \
20+
tzdata \
21+
zlib-devel
22+
23+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
24+
25+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
26+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
27+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
28+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
29+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
30+
ARG SWIFT_PLATFORM=amazonlinux
31+
ARG OS_MAJOR_VER=2
32+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-5.7-branch
33+
34+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
35+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
36+
OS_MAJOR_VER=$OS_MAJOR_VER \
37+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \
38+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER"
39+
40+
RUN echo "${SWIFT_WEBROOT}/latest-build.yml"
41+
42+
RUN set -e; \
43+
# - Latest Toolchain info
44+
export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
45+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
46+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
47+
&& echo $DOWNLOAD_DIR > .swift_tag \
48+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
49+
&& export GNUPGHOME="$(mktemp -d)" \
50+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
51+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
52+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
53+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
54+
# - Unpack the toolchain, set libs permissions, and clean up.
55+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
56+
&& chmod -R o+r /usr/lib/swift \
57+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
58+
59+
# Print Installed Swift Version
60+
RUN swift --version
61+
62+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
63+
>> /etc/bashrc; \
64+
echo -e " ################################################################\n" \
65+
"#\t\t\t\t\t\t\t\t#\n" \
66+
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
67+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
68+
"#\t\t\t\t\t\t\t\t#\n" \
69+
"################################################################\n" > /etc/motd
70+
71+
RUN echo 'source /etc/bashrc' >> /root/.bashrc
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
FROM amazonlinux:2 AS base
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+
glibc-static \
10+
gzip \
11+
libbsd \
12+
libcurl-devel \
13+
libedit \
14+
libicu \
15+
libsqlite \
16+
libstdc++-static \
17+
libuuid \
18+
libxml2-devel \
19+
tar \
20+
tzdata \
21+
zlib-devel
22+
23+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
24+
25+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
26+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
27+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
28+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
29+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
30+
ARG SWIFT_PLATFORM=amazonlinux
31+
ARG OS_MAJOR_VER=2
32+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-5.7-branch
33+
34+
# This is a small trick to enable if/else for arm64 and amd64.
35+
# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options.
36+
FROM base AS base-amd64
37+
ARG OS_ARCH_SUFFIX=
38+
ARG ADDITIONAL_TAR_OPTIONS="--strip-components=1"
39+
40+
FROM base AS base-arm64
41+
ARG OS_ARCH_SUFFIX=-aarch64
42+
ARG ADDITIONAL_TAR_OPTIONS=
43+
44+
FROM base-$TARGETARCH AS final
45+
46+
ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX
47+
ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX"
48+
49+
RUN echo "${PLATFORM_WEBROOT}/latest-build.yml"
50+
51+
RUN set -e; \
52+
# - Latest Toolchain info
53+
export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
54+
&& export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
55+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
56+
&& echo $DOWNLOAD_DIR > .swift_tag \
57+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
58+
&& export GNUPGHOME="$(mktemp -d)" \
59+
&& curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
60+
${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
61+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
62+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
63+
# - Unpack the toolchain, set libs permissions, and clean up.
64+
&& tar -xzf latest_toolchain.tar.gz --directory / ${ADDITIONAL_TAR_OPTIONS} \
65+
&& chmod -R o+r /usr/lib/swift \
66+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
67+
68+
# Print Installed Swift Version
69+
RUN swift --version
70+
71+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
72+
>> /etc/bashrc; \
73+
echo -e " ################################################################\n" \
74+
"#\t\t\t\t\t\t\t\t#\n" \
75+
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
76+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
77+
"#\t\t\t\t\t\t\t\t#\n" \
78+
"################################################################\n" > /etc/motd
79+
80+
RUN echo 'source /etc/bashrc' >> /root/.bashrc
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
8+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
9+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
10+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
11+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
12+
ARG SWIFT_PLATFORM=amazonlinux
13+
ARG OS_MAJOR_VER=2
14+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-5.7-branch
15+
16+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
17+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
18+
OS_MAJOR_VER=$OS_MAJOR_VER \
19+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \
20+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER"
21+
22+
RUN echo "${SWIFT_WEBROOT}/latest-build.yml"
23+
24+
RUN set -e; \
25+
# - Latest Toolchain info
26+
export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
27+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
28+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
29+
&& echo $DOWNLOAD_DIR > .swift_tag \
30+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
31+
&& export GNUPGHOME="$(mktemp -d)" \
32+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
33+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
34+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
35+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
36+
# - Unpack the toolchain, set libs permissions, and clean up.
37+
&& yum -y install tar gzip \
38+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
39+
&& chmod -R o+r /usr/lib/swift \
40+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
41+
&& yum autoremove -y tar gzip
42+
43+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
44+
>> /etc/bashrc; \
45+
echo -e " ################################################################\n" \
46+
"#\t\t\t\t\t\t\t\t#\n" \
47+
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
48+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
49+
"#\t\t\t\t\t\t\t\t#\n" \
50+
"################################################################\n" > /etc/motd
51+
52+
RUN echo 'source /etc/bashrc' >> /root/.bashrc

nightly-5.7/centos/7/Dockerfile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
glibc-static \
10+
libbsd-devel \
11+
libcurl-devel \
12+
libedit \
13+
libedit-devel \
14+
libicu-devel \
15+
libstdc++-static \
16+
libxml2-devel \
17+
pkg-config \
18+
python2 \
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+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
28+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
29+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
30+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
31+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
32+
ARG SWIFT_PLATFORM=centos
33+
ARG OS_MAJOR_VER=7
34+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-5.7-branch
35+
36+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
37+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
38+
OS_MAJOR_VER=$OS_MAJOR_VER \
39+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \
40+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER"
41+
42+
RUN echo "${SWIFT_WEBROOT}/latest-build.yml"
43+
44+
RUN set -e; \
45+
# - Latest Toolchain info
46+
export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
47+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
48+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
49+
&& echo $DOWNLOAD_DIR > .swift_tag \
50+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
51+
&& export GNUPGHOME="$(mktemp -d)" \
52+
&& curl -fL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
53+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
54+
&& curl -fL https://swift.org/keys/all-keys.asc | gpg --import - \
55+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
56+
# - Unpack the toolchain, set libs permissions, and clean up.
57+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
58+
&& chmod -R o+r /usr/lib/swift \
59+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz
60+
61+
# Print Installed Swift Version
62+
RUN swift --version
63+
64+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
65+
>> /etc/bashrc; \
66+
echo -e " ################################################################\n" \
67+
"#\t\t\t\t\t\t\t\t#\n" \
68+
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
69+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
70+
"#\t\t\t\t\t\t\t\t#\n" \
71+
"################################################################\n" > /etc/motd

nightly-5.7/centos/7/slim/Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
8+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
9+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
10+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
11+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
12+
ARG SWIFT_PLATFORM=centos
13+
ARG OS_MAJOR_VER=7
14+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-5.7-branch
15+
16+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
17+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
18+
OS_MAJOR_VER=$OS_MAJOR_VER \
19+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \
20+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER"
21+
22+
RUN echo "${SWIFT_WEBROOT}/latest-build.yml"
23+
24+
RUN set -e; \
25+
# - Latest Toolchain info
26+
export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
27+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
28+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
29+
&& echo $DOWNLOAD_DIR > .swift_tag \
30+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
31+
&& export GNUPGHOME="$(mktemp -d)" \
32+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
33+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
34+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
35+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
36+
# - Unpack the toolchain, set libs permissions, and clean up.
37+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
38+
&& chmod -R o+r /usr/lib/swift \
39+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz
40+
41+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
42+
>> /etc/bashrc; \
43+
echo -e " ################################################################\n" \
44+
"#\t\t\t\t\t\t\t\t#\n" \
45+
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
46+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
47+
"#\t\t\t\t\t\t\t\t#\n" \
48+
"################################################################\n" > /etc/motd

nightly-5.7/ubuntu/18.04/Dockerfile

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
binutils \
8+
git \
9+
libc6-dev \
10+
libcurl4-openssl-dev \
11+
libedit2 \
12+
libgcc-5-dev \
13+
libpython3.6 \
14+
libsqlite3-0 \
15+
libstdc++-5-dev \
16+
libxml2-dev \
17+
pkg-config \
18+
tzdata \
19+
zlib1g-dev \
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+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
25+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
26+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
27+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
28+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
29+
ARG SWIFT_PLATFORM=ubuntu
30+
ARG OS_MAJOR_VER=18
31+
ARG OS_MIN_VER=04
32+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-5.7-branch
33+
34+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
35+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
36+
OS_MAJOR_VER=$OS_MAJOR_VER \
37+
OS_MIN_VER=$OS_MIN_VER \
38+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \
39+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER"
40+
41+
RUN set -e; \
42+
# - Grab curl here so we cache better up above
43+
export DEBIAN_FRONTEND=noninteractive \
44+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
45+
# - Latest Toolchain info
46+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
47+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
48+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
49+
&& echo $DOWNLOAD_DIR > .swift_tag \
50+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
51+
&& export GNUPGHOME="$(mktemp -d)" \
52+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
53+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
54+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
55+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
56+
# - Unpack the toolchain, set libs permissions, and clean up.
57+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
58+
&& chmod -R o+r /usr/lib/swift \
59+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
60+
&& apt-get purge --auto-remove -y curl
61+
62+
# Print Installed Swift Version
63+
RUN swift --version
64+
65+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
66+
>> /etc/bash.bashrc; \
67+
echo " ################################################################\n" \
68+
"#\t\t\t\t\t\t\t\t#\n" \
69+
"# Swift Nightly Docker Image\t\t\t\t\t#\n" \
70+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
71+
"#\t\t\t\t\t\t\t\t#\n" \
72+
"################################################################\n" > /etc/motd

0 commit comments

Comments
 (0)