Skip to content

Commit 1cb54c6

Browse files
authored
Merge pull request #153 from apple/shahmishal/nightly-master
[Nightly] Adding Dockerfiles for nightly master toolchains
2 parents 7217722 + 1be18e8 commit 1cb54c6

File tree

4 files changed

+224
-0
lines changed

4 files changed

+224
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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/development
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+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
50+
&& export GNUPGHOME="$(mktemp -d)" \
51+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
52+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
53+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
54+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
55+
# - Unpack the toolchain, set libs permissions, and clean up.
56+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
57+
&& chmod -R o+r /usr/lib/swift \
58+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
59+
&& apt-get purge --auto-remove -y curl
60+
61+
# Print Installed Swift Version
62+
RUN swift --version
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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/development
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+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
41+
&& export GNUPGHOME="$(mktemp -d)" \
42+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
43+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
44+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
45+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
46+
# - Unpack the toolchain, set libs permissions, and clean up.
47+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
48+
&& chmod -R o+r /usr/lib/swift \
49+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
50+
&& apt-get purge --auto-remove -y curl
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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/development
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+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
50+
&& export GNUPGHOME="$(mktemp -d)" \
51+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
52+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
53+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
54+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
55+
# - Unpack the toolchain, set libs permissions, and clean up.
56+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
57+
&& chmod -R o+r /usr/lib/swift \
58+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
59+
&& apt-get purge --auto-remove -y curl
60+
61+
# Print Installed Swift Version
62+
RUN swift --version
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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/development
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+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
41+
&& export GNUPGHOME="$(mktemp -d)" \
42+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
43+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
44+
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$SWIFT_SIGNING_KEY" \
45+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
46+
# - Unpack the toolchain, set libs permissions, and clean up.
47+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
48+
&& chmod -R o+r /usr/lib/swift \
49+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
50+
&& apt-get purge --auto-remove -y curl gnupg

0 commit comments

Comments
 (0)