Skip to content

Commit b8dfc96

Browse files
committed
[Nightly] Swift 5.2 dockerfiles
1 parent df1dd82 commit b8dfc96

File tree

4 files changed

+264
-0
lines changed

4 files changed

+264
-0
lines changed

nightly-5.2/ubuntu/16.04/Dockerfile

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
# 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=16
31+
ARG OS_MIN_VER=04
32+
ARG SWIFT_WEBROOT=https://swift.org/builds/swift-5.2-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+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
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#\n" \
70+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
71+
"#\t\t\t\t\t\t\t\t#\n" \
72+
"################################################################\n" > /etc/motd
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
16+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
17+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
18+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
19+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
20+
ARG SWIFT_PLATFORM=ubuntu
21+
ARG OS_MAJOR_VER=16
22+
ARG OS_MIN_VER=04
23+
ARG SWIFT_WEBROOT=https://swift.org/builds/swift-5.2-branch
24+
25+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
26+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
27+
OS_MAJOR_VER=$OS_MAJOR_VER \
28+
OS_MIN_VER=$OS_MIN_VER \
29+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \
30+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER"
31+
32+
RUN set -e; \
33+
# - Grab curl and gpg here so we cache better up above
34+
export DEBIAN_FRONTEND=noninteractive \
35+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
36+
# - Latest Toolchain info
37+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
38+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
39+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
40+
&& echo $DOWNLOAD_DIR > .swift_tag \
41+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
42+
&& export GNUPGHOME="$(mktemp -d)" \
43+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
44+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
45+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
46+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
47+
# - Unpack the toolchain, set libs permissions, and clean up.
48+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
49+
&& chmod -R o+r /usr/lib/swift \
50+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
51+
&& apt-get purge --auto-remove -y curl
52+
53+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
54+
>> /etc/bash.bashrc; \
55+
echo " ################################################################\n" \
56+
"#\t\t\t\t\t\t\t\t#\n" \
57+
"# Swift Nightly Docker Image\t\t\t\t#\n" \
58+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
59+
"#\t\t\t\t\t\t\t\t#\n" \
60+
"################################################################\n" > /etc/motd

nightly-5.2/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+
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+
# 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://swift.org/builds/swift-5.2-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+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
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#\n" \
70+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
71+
"#\t\t\t\t\t\t\t\t#\n" \
72+
"################################################################\n" > /etc/motd
Lines changed: 60 additions & 0 deletions
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 \
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+
# gpg --keyid-format LONG -k FAF6989E1BC16FEA
16+
# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06]
17+
# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
18+
# uid [ unknown] Swift Automatic Signing Key #3 <[email protected]>
19+
ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA
20+
ARG SWIFT_PLATFORM=ubuntu
21+
ARG OS_MAJOR_VER=18
22+
ARG OS_MIN_VER=04
23+
ARG SWIFT_WEBROOT=https://swift.org/builds/swift-5.2-branch
24+
25+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
26+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
27+
OS_MAJOR_VER=$OS_MAJOR_VER \
28+
OS_MIN_VER=$OS_MIN_VER \
29+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \
30+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER"
31+
32+
RUN set -e; \
33+
# - Grab curl and gpg here so we cache better up above
34+
export DEBIAN_FRONTEND=noninteractive \
35+
&& apt-get -q update && apt-get -q install -y curl gnupg && rm -rf /var/lib/apt/lists/* \
36+
# - Latest Toolchain info
37+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
38+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
39+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
40+
&& echo $DOWNLOAD_DIR > .swift_tag \
41+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
42+
&& export GNUPGHOME="$(mktemp -d)" \
43+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
44+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
45+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
46+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
47+
# - Unpack the toolchain, set libs permissions, and clean up.
48+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
49+
&& chmod -R o+r /usr/lib/swift \
50+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
51+
&& apt-get purge --auto-remove -y curl gnupg
52+
53+
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
54+
>> /etc/bash.bashrc; \
55+
echo " ################################################################\n" \
56+
"#\t\t\t\t\t\t\t\t#\n" \
57+
"# Swift Nightly Docker Image\t\t\t\t#\n" \
58+
"# Tag: $(cat .swift_tag)\t\t\t#\n" \
59+
"#\t\t\t\t\t\t\t\t#\n" \
60+
"################################################################\n" > /etc/motd

0 commit comments

Comments
 (0)