Skip to content

Commit 1e7ad9f

Browse files
authored
Add support for Swift 5.10 Release (#372)
1 parent b8de104 commit 1e7ad9f

File tree

13 files changed

+859
-0
lines changed

13 files changed

+859
-0
lines changed

5.10/amazonlinux/2/Dockerfile

Lines changed: 68 additions & 0 deletions
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.10-release
32+
ARG SWIFT_VERSION=swift-5.10-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.10/amazonlinux/2/slim/Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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.10-release
13+
ARG SWIFT_VERSION=swift-5.10-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 \
45+
$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \
46+
$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \
47+
&& chmod -R o+r /usr/lib/swift /usr/libexec/swift \
48+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
49+
&& yum autoremove -y tar gzip

5.10/centos/7/Dockerfile

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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.10-release
33+
ARG SWIFT_VERSION=swift-5.10-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+
# The devtoolset-8 that the Swift runtime is built against uses new
57+
# functionality in the backdeploy `libstdc++_noshared.a` in devtoolset-a.
58+
# A linkerscript in the devtoolset ensures that it is picked up appropriately.
59+
# When dynamically linking the runtime, this static archive is merged into the
60+
# shared object. When static linking, the compat library needs to be available
61+
# to be merged into the final shared object/executable.
62+
#
63+
# Symlink it from the devtoolset into the static swift resource directory
64+
RUN yum install -y centos-release-scl
65+
RUN yum install -y devtoolset-8
66+
RUN ln -s /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++_nonshared.a /usr/lib/swift_static/linux && \
67+
ln -s /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++.so /usr/lib/swift_static/linux
68+
69+
# Print Installed Swift Version
70+
RUN swift --version

5.10/centos/7/slim/Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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.10-release
13+
ARG SWIFT_VERSION=swift-5.10-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 \
33+
$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \
34+
$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \
35+
&& chmod -R o+r /usr/lib/swift /usr/libexec/swift \
36+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz

5.10/rhel-ubi/9/Dockerfile

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

5.10/rhel-ubi/9/slim/Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM redhat/ubi9
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=ubi9
12+
ARG SWIFT_BRANCH=swift-5.10-release
13+
ARG SWIFT_VERSION=swift-5.10-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 \
45+
$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \
46+
$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \
47+
&& chmod -R o+r /usr/lib/swift /usr/libexec/swift \
48+
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz

0 commit comments

Comments
 (0)