Skip to content

Commit 62d7e9f

Browse files
authored
Merge branch 'main' into 10-dev
2 parents 4d5bfb9 + 5d771d7 commit 62d7e9f

File tree

48 files changed

+1745
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1745
-26
lines changed

5.6/amazonlinux/2/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN yum -y install \
66
binutils \
77
gcc \
88
git \
9+
unzip \
910
glibc-static \
1011
gzip \
1112
libbsd \
@@ -27,8 +28,8 @@ RUN yum -y install \
2728
# uid Swift 5.x Release Signing Key <[email protected]
2829
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
2930
ARG SWIFT_PLATFORM=amazonlinux2
30-
ARG SWIFT_BRANCH=swift-5.6.1-release
31-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
31+
ARG SWIFT_BRANCH=swift-5.6.3-release
32+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
3233
ARG SWIFT_WEBROOT=https://download.swift.org
3334

3435
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \

5.6/amazonlinux/2/slim/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ LABEL description="Docker Container for the Swift programming language"
99
# uid Swift 5.x Release Signing Key <[email protected]
1010
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
1111
ARG SWIFT_PLATFORM=amazonlinux2
12-
ARG SWIFT_BRANCH=swift-5.6.1-release
13-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
12+
ARG SWIFT_BRANCH=swift-5.6.3-release
13+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
1414
ARG SWIFT_WEBROOT=https://download.swift.org
1515

1616
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \

5.6/centos/7/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN yum install shadow-utils.x86_64 -y \
66
binutils \
77
gcc \
88
git \
9+
unzip \
910
glibc-static \
1011
libbsd-devel \
1112
libcurl-devel \
@@ -28,8 +29,8 @@ RUN sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h
2829
# uid Swift 5.x Release Signing Key <[email protected]
2930
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
3031
ARG SWIFT_PLATFORM=centos7
31-
ARG SWIFT_BRANCH=swift-5.6.1-release
32-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
32+
ARG SWIFT_BRANCH=swift-5.6.3-release
33+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
3334
ARG SWIFT_WEBROOT=https://download.swift.org
3435

3536
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \

5.6/centos/7/slim/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ LABEL description="Docker Container for the Swift programming language"
99
# uid Swift 5.x Release Signing Key <[email protected]
1010
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
1111
ARG SWIFT_PLATFORM=centos7
12-
ARG SWIFT_BRANCH=swift-5.6.1-release
13-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
12+
ARG SWIFT_BRANCH=swift-5.6.3-release
13+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
1414
ARG SWIFT_WEBROOT=https://download.swift.org
1515

1616
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \

5.6/ubuntu/18.04/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && ap
1717
libpython3.6 \
1818
tzdata \
1919
git \
20+
unzip \
2021
pkg-config \
2122
&& rm -r /var/lib/apt/lists/*
2223

@@ -27,8 +28,8 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && ap
2728
# uid Swift 5.x Release Signing Key <[email protected]
2829
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
2930
ARG SWIFT_PLATFORM=ubuntu18.04
30-
ARG SWIFT_BRANCH=swift-5.6.1-release
31-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
31+
ARG SWIFT_BRANCH=swift-5.6.3-release
32+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
3233
ARG SWIFT_WEBROOT=https://download.swift.org
3334

3435
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \

5.6/ubuntu/18.04/slim/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && ap
1717
# uid Swift 5.x Release Signing Key <[email protected]
1818
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
1919
ARG SWIFT_PLATFORM=ubuntu18.04
20-
ARG SWIFT_BRANCH=swift-5.6.1-release
21-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
20+
ARG SWIFT_BRANCH=swift-5.6.3-release
21+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
2222
ARG SWIFT_WEBROOT=https://download.swift.org
2323

2424
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \

5.6/ubuntu/20.04/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && ap
66
apt-get -q install -y \
77
binutils \
88
git \
9+
unzip \
910
gnupg2 \
1011
libc6-dev \
1112
libcurl4-openssl-dev \
@@ -28,8 +29,8 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && ap
2829
# uid Swift 5.x Release Signing Key <[email protected]
2930
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
3031
ARG SWIFT_PLATFORM=ubuntu20.04
31-
ARG SWIFT_BRANCH=swift-5.6.1-release
32-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
32+
ARG SWIFT_BRANCH=swift-5.6.3-release
33+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
3334
ARG SWIFT_WEBROOT=https://download.swift.org
3435

3536
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \

5.6/ubuntu/20.04/slim/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && ap
1616
# uid Swift 5.x Release Signing Key <[email protected]
1717
ARG SWIFT_SIGNING_KEY=A62AE125BBBFBB96A6E042EC925CC1CCED3D1561
1818
ARG SWIFT_PLATFORM=ubuntu20.04
19-
ARG SWIFT_BRANCH=swift-5.6.1-release
20-
ARG SWIFT_VERSION=swift-5.6.1-RELEASE
19+
ARG SWIFT_BRANCH=swift-5.6.3-release
20+
ARG SWIFT_VERSION=swift-5.6.3-RELEASE
2121
ARG SWIFT_WEBROOT=https://download.swift.org
2222

2323
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
@@ -53,4 +53,4 @@ RUN set -e; \
5353
&& tar -xzf swift.tar.gz --directory / --strip-components=1 $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \
5454
&& chmod -R o+r /usr/lib/swift \
5555
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \
56-
&& apt-get purge --auto-remove -y curl gnupg
56+
&& apt-get purge --auto-remove -y curl gnupg

5.6/windows/20H2/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL maintainer="Swift Infrastructure <[email protected]>"
66
LABEL description="Docker Container for the Swift programming language"
77

88
ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.35.1.windows.2/Git-2.35.1.2-64-bit.exe
9-
ARG INSTALLER=https://download.swift.org/swift-5.6.1-release/windows10/swift-5.6.1-RELEASE/swift-5.6.1-RELEASE-windows10.exe
9+
ARG INSTALLER=https://download.swift.org/swift-5.6.3-release/windows10/swift-5.6.3-RELEASE/swift-5.6.3-RELEASE-windows10.exe
1010
ARG PYTHON=https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe
1111

1212
# restore the default Windows shell for correct batch processing

5.6/windows/LTSC2022/Dockerfile

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# escape=`
2+
3+
FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS windows
4+
5+
LABEL maintainer="Swift Infrastructure <[email protected]>"
6+
LABEL description="Docker Container for the Swift programming language"
7+
8+
ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.35.1.windows.2/Git-2.35.1.2-64-bit.exe
9+
ARG INSTALLER=https://download.swift.org/swift-5.6.3-release/windows10/swift-5.6.3-RELEASE/swift-5.6.3-RELEASE-windows10.exe
10+
ARG PYTHON=https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe
11+
12+
# restore the default Windows shell for correct batch processing
13+
SHELL ["cmd", "/S", "/C"]
14+
15+
# Install Visual Studio Build Tools
16+
RUN `
17+
curl -SLo vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
18+
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
19+
--add Microsoft.VisualStudio.Component.Windows11SDK.22000 `
20+
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
21+
|| IF "%EXITCODE%"=="3010" EXIT 0) `
22+
&& del /q vs_buildtools.exe
23+
24+
# Install Swift toolchain.
25+
RUN `
26+
curl -SLo installer.exe %INSTALLER% `
27+
&& (start /w installer.exe -q) `
28+
&& del /q installer.exe
29+
30+
# Install Git.
31+
# See: git-[version]-[bit].exe /SAVEINF=git.inf and /?
32+
RUN `
33+
curl -SLo git.exe %GIT% `
34+
&& (start /w git.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NOCANCEL /NORESTART /CLOSEAPPLICATIONS /FORCECLOSEAPPLICATIONS /NOICONS /COMPONENTS="gitlfs" /EditorOption=VIM /PathOption=Cmd /SSHOption=OpenSSH /CURLOption=WinSSL /UseCredentialManager=Enabled /PerformanceTweaksFSCache=Enabled /EnableSymlinks=Enabled /EnableFSMonitor=Enabled ) `
35+
&& del /q git.exe
36+
37+
# Install Python.
38+
# See: https://docs.python.org/3.10/using/windows.html
39+
# FIXME: it appears that `PYTHONHOME` and `PYTHONPATH` are unset
40+
RUN `
41+
curl -SLo python.exe %PYTHON% `
42+
&& (start /w python.exe /quiet InstallAllUsers=1 AssociateFiles=0 PrependPath=1 Shortcuts=0 Include_doc=0 Include_debug=0 Include_dev=0 Include_exe=0 Include_launcher=0 InstallLauncherAllUsers=0 Include_lib=1 Include_pip=0 Include_symbols=0 Include_tcltk=0 Include_test=0 Include_tools=0 ) `
43+
&& del /q python.exe
44+
45+
# Default to powershell
46+
# FIXME: we need to grant ContainerUser the SeCreateSymbolicLinkPrivilege
47+
# privilege so that it can create symbolic links.
48+
# USER ContainerUser
49+
CMD ["powershell.exe", "-nologo", "-ExecutionPolicy", "Bypass"]

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

0 commit comments

Comments
 (0)