diff --git a/6.1/amazonlinux/2/Dockerfile b/6.1/amazonlinux/2/Dockerfile new file mode 100644 index 00000000..e5ccc59b --- /dev/null +++ b/6.1/amazonlinux/2/Dockerfile @@ -0,0 +1,69 @@ +FROM amazonlinux:2 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + unzip \ + glibc-static \ + gzip \ + libbsd \ + libcurl-devel \ + libedit \ + libicu \ + libsqlite \ + libstdc++-static \ + libuuid \ + libxml2-devel \ + openssl-devel \ + tar \ + tzdata \ + zlib-devel + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=amazonlinux2 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + && echo $SWIFT_BIN_URL \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz + +# Print Installed Swift Version +RUN swift --version diff --git a/6.1/amazonlinux/2/slim/Dockerfile b/6.1/amazonlinux/2/slim/Dockerfile new file mode 100644 index 00000000..67b5b9cc --- /dev/null +++ b/6.1/amazonlinux/2/slim/Dockerfile @@ -0,0 +1,49 @@ +FROM amazonlinux:2 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=amazonlinux2 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && yum -y install tar gzip \ + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && yum autoremove -y tar gzip diff --git a/6.1/debian/12/Dockerfile b/6.1/debian/12/Dockerfile new file mode 100644 index 00000000..09022a69 --- /dev/null +++ b/6.1/debian/12/Dockerfile @@ -0,0 +1,71 @@ +FROM debian:12 + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils-gold \ + libicu-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libsqlite3-dev \ + libncurses-dev \ + libpython3-dev \ + libxml2-dev \ + pkg-config \ + uuid-dev \ + tzdata \ + git \ + gcc \ + libstdc++-12-dev \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=debian12 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl and gpg here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl gpg && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl gpg + +# Print Installed Swift Version +RUN swift --version diff --git a/6.1/debian/12/slim/Dockerfile b/6.1/debian/12/slim/Dockerfile new file mode 100644 index 00000000..1f75a4f2 --- /dev/null +++ b/6.1/debian/12/slim/Dockerfile @@ -0,0 +1,58 @@ +FROM debian:12 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + libcurl4 \ + libxml2 \ + tzdata \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=debian12 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl and gpg here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl gpg && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl gpg diff --git a/6.1/fedora/39/Dockerfile b/6.1/fedora/39/Dockerfile new file mode 100644 index 00000000..4d1cc247 --- /dev/null +++ b/6.1/fedora/39/Dockerfile @@ -0,0 +1,65 @@ +FROM fedora:39 + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + unzip \ + libcurl-devel \ + libedit-devel \ + libicu-devel \ + sqlite-devel \ + libuuid-devel \ + libxml2-devel \ + python3-devel \ + libstdc++-devel \ + libstdc++-static + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=fedora39 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + && echo $SWIFT_BIN_URL \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz + +# Print Installed Swift Version +RUN swift --version diff --git a/6.1/fedora/39/slim/Dockerfile b/6.1/fedora/39/slim/Dockerfile new file mode 100644 index 00000000..881cd1bb --- /dev/null +++ b/6.1/fedora/39/slim/Dockerfile @@ -0,0 +1,48 @@ +FROM fedora:39 + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=fedora39 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -ex; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz diff --git a/6.1/rhel-ubi/9/Dockerfile b/6.1/rhel-ubi/9/Dockerfile new file mode 100644 index 00000000..e511f4d3 --- /dev/null +++ b/6.1/rhel-ubi/9/Dockerfile @@ -0,0 +1,63 @@ +FROM redhat/ubi9 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + git \ + gcc-c++ \ + libcurl-devel \ + libedit-devel \ + libuuid-devel \ + libxml2-devel \ + ncurses-devel \ + python3-devel \ + rsync \ + sqlite-devel \ + unzip \ + zip + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubi9 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + && echo $SWIFT_BIN_URL \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz + +# Print Installed Swift Version +RUN swift --version diff --git a/6.1/rhel-ubi/9/slim/Dockerfile b/6.1/rhel-ubi/9/slim/Dockerfile new file mode 100644 index 00000000..9f095346 --- /dev/null +++ b/6.1/rhel-ubi/9/slim/Dockerfile @@ -0,0 +1,48 @@ +FROM redhat/ubi9 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubi9 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && yum -y install tar gzip \ + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz diff --git a/6.1/ubuntu/20.04/Dockerfile b/6.1/ubuntu/20.04/Dockerfile new file mode 100644 index 00000000..0bf992f7 --- /dev/null +++ b/6.1/ubuntu/20.04/Dockerfile @@ -0,0 +1,72 @@ +FROM ubuntu:20.04 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils \ + git \ + unzip \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libedit2 \ + libgcc-9-dev \ + libpython3.8 \ + libsqlite3-0 \ + libstdc++-9-dev \ + libxml2-dev \ + libz3-dev \ + pkg-config \ + tzdata \ + zlib1g-dev \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubuntu20.04 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version diff --git a/6.1/ubuntu/20.04/slim/Dockerfile b/6.1/ubuntu/20.04/slim/Dockerfile new file mode 100644 index 00000000..b9954a69 --- /dev/null +++ b/6.1/ubuntu/20.04/slim/Dockerfile @@ -0,0 +1,58 @@ +FROM ubuntu:20.04 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + libcurl4 \ + libxml2 \ + tzdata \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubuntu20.04 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl and gpg here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl gnupg && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl gnupg diff --git a/6.1/ubuntu/22.04/Dockerfile b/6.1/ubuntu/22.04/Dockerfile new file mode 100644 index 00000000..d3be1e41 --- /dev/null +++ b/6.1/ubuntu/22.04/Dockerfile @@ -0,0 +1,73 @@ +FROM ubuntu:22.04 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils \ + git \ + unzip \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libedit2 \ + libgcc-11-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-11-dev \ + libxml2-dev \ + libz3-dev \ + pkg-config \ + python3-lldb-13 \ + tzdata \ + zlib1g-dev \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubuntu22.04 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version diff --git a/6.1/ubuntu/22.04/slim/Dockerfile b/6.1/ubuntu/22.04/slim/Dockerfile new file mode 100644 index 00000000..0b733079 --- /dev/null +++ b/6.1/ubuntu/22.04/slim/Dockerfile @@ -0,0 +1,58 @@ +FROM ubuntu:22.04 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + libcurl4 \ + libxml2 \ + tzdata \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubuntu22.04 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl and gpg here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl gnupg && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl gnupg diff --git a/6.1/ubuntu/24.04/Dockerfile b/6.1/ubuntu/24.04/Dockerfile new file mode 100644 index 00000000..41f35ef0 --- /dev/null +++ b/6.1/ubuntu/24.04/Dockerfile @@ -0,0 +1,73 @@ +FROM ubuntu:24.04 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils \ + git \ + unzip \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libedit2 \ + libgcc-13-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-13-dev \ + libxml2-dev \ + libncurses-dev \ + libz3-dev \ + pkg-config \ + tzdata \ + zlib1g-dev \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubuntu24.04 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version diff --git a/6.1/ubuntu/24.04/slim/Dockerfile b/6.1/ubuntu/24.04/slim/Dockerfile new file mode 100644 index 00000000..8b430261 --- /dev/null +++ b/6.1/ubuntu/24.04/slim/Dockerfile @@ -0,0 +1,59 @@ +FROM ubuntu:24.04 + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + libcurl4 \ + libxml2 \ + tzdata \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# pub rsa4096 2024-09-16 [SC] [expires: 2026-09-16] +# 52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +# uid [ unknown] Swift 6.x Release Signing Key +ARG SWIFT_SIGNING_KEY=52BB7E3DE28A71BE22EC05FFEF80A866B47A981F +ARG SWIFT_PLATFORM=ubuntu24.04 +ARG SWIFT_BRANCH=swift-6.1-release +ARG SWIFT_VERSION=swift-6.1-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + url=; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo $SWIFT_PLATFORM | tr -d .)$OS_ARCH_SUFFIX" \ + && SWIFT_BIN_URL="$SWIFT_WEBDIR/$SWIFT_VERSION/$SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX.tar.gz" \ + && SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ + # - Grab curl and gpg here so we cache better up above + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -q update && apt-get -q install -y curl gnupg && rm -rf /var/lib/apt/lists/* \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL "$SWIFT_BIN_URL" -o swift.tar.gz "$SWIFT_SIG_URL" -o swift.tar.gz.sig \ + && gpg --batch --quiet --keyserver keyserver.ubuntu.com --recv-keys "$SWIFT_SIGNING_KEY" \ + && gpg --batch --verify swift.tar.gz.sig swift.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf swift.tar.gz --directory / --strip-components=1 \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/lib/swift/linux \ + $SWIFT_VERSION-$SWIFT_PLATFORM$OS_ARCH_SUFFIX/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ + && apt-get purge --auto-remove -y curl gnupg diff --git a/6.1/windows/1809/Dockerfile b/6.1/windows/1809/Dockerfile new file mode 100644 index 00000000..1522366e --- /dev/null +++ b/6.1/windows/1809/Dockerfile @@ -0,0 +1,156 @@ +FROM mcr.microsoft.com/windows/servercore:1809 AS windows + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHONIOENCODING UTF-8 + +# Install Git. +# See: git-[version]-[bit].exe /SAVEINF=git.inf and /? +ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.42.0.windows.2/Git-2.42.0.2-64-bit.exe +ARG GIT_SHA256=BD9B41641A258FD16D99BEECEC66132160331D685DFB4C714CEA2BCC78D63BDB +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:GIT}); \ + Invoke-WebRequest -Uri ${env:GIT} -OutFile git.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:GIT_SHA256}); \ + $Hash = Get-FileHash git.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:GIT_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + exit 1; \ + } \ + Write-Host -NoNewLine 'Installing git ... '; \ + $Process = \ + Start-Process git.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + '/SP-', \ + '/VERYSILENT', \ + '/SUPPRESSMSGBOXES', \ + '/NOCANCEL', \ + '/NORESTART', \ + '/CLOSEAPPLICATIONS', \ + '/FORCECLOSEAPPLICATIONS', \ + '/NOICONS', \ + '/COMPONENTS="gitlfs"', \ + '/EditorOption=VIM', \ + '/PathOption=Cmd', \ + '/SSHOption=OpenSSH', \ + '/CURLOption=WinSSL', \ + '/UseCredentialManager=Enabled', \ + '/EnableSymlinks=Enabled', \ + '/EnableFSMonitor=Enabled' \ + ); \ + if ($Process.ExitCode -eq 0) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force git.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Install Python +ARG PY39=https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe +ARG PY39_SHA256=FB3D0466F3754752CA7FD839A09FFE53375FF2C981279FD4BC23A005458F7F5D +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:PY39}); \ + Invoke-WebRequest -Uri ${env:PY39} -OutFile python-3.9.13-amd64.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:PY39_SHA256});\ + $Hash = Get-FileHash python-3.9.13-amd64.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:PY39_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + exit 1; \ + } \ + Write-Host -NoNewLine 'Installing Python ... '; \ + $Process = \ + Start-Process python-3.9.13-amd64.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + 'AssociateFiles=0', \ + 'Include_doc=0', \ + 'Include_debug=0', \ + 'Include_lib=1', \ + 'Include_tcltk=0', \ + 'Include_test=0', \ + 'InstallAllUsers=1', \ + 'InstallLauncherAllUsers=0', \ + 'PrependPath=1', \ + '/quiet' \ + ); \ + if ($Process.ExitCode -eq 0) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force python-3.9.13-amd64.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Install Visual Studio Build Tools +ARG VSB=https://download.visualstudio.microsoft.com/download/pr/5536698c-711c-4834-876f-2817d31a2ef2/c792bdb0fd46155de19955269cac85d52c4c63c23db2cf43d96b9390146f9390/vs_BuildTools.exe +ARG VSB_SHA256=C792BDB0FD46155DE19955269CAC85D52C4C63C23DB2CF43D96B9390146F9390 +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB}); \ + Invoke-WebRequest -Uri ${env:VSB} -OutFile vs_buildtools.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:VSB_SHA256}); \ + $Hash = Get-FileHash vs_buildtools.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:VSB_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + } \ + Write-Host -NoNewLine 'Installing Visual Studio Build Tools ... '; \ + $Process = \ + Start-Process vs_buildtools.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + '--quiet', \ + '--wait', \ + '--norestart', \ + '--nocache', \ + '--add', 'Microsoft.VisualStudio.Component.Windows11SDK.22000', \ + '--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' \ + ); \ + if ($Process.ExitCode -eq 0 -or $Process.ExitCode -eq 3010) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force vs_buildtools.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Install Swift toolchain. +ARG SWIFT=https://download.swift.org/swift-6.1-release/windows10/swift-6.1-RELEASE/swift-6.1-RELEASE-windows10.exe +ARG SWIFT_SHA256=8C8AEF8B4A449EBEEFD74482AC767E269F8CBE7E520871C1D103C7079C5F4C6A +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT}); \ + Invoke-WebRequest -Uri ${env:SWIFT} -OutFile installer.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:SWIFT_SHA256}); \ + $Hash = Get-FileHash installer.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:SWIFT_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + exit 1; \ + } \ + Write-Host -NoNewLine 'Installing Swift ... '; \ + $Process = \ + Start-Process installer.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + '/quiet', \ + '/norestart' \ + ); \ + if ($Process.ExitCode -eq 0) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force installer.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Default to powershell +# FIXME: we need to grant ContainerUser the SeCreateSymbolicLinkPrivilege +# privilege so that it can create symbolic links. +# USER ContainerUser +CMD ["powershell.exe", "-nologo", "-ExecutionPolicy", "Bypass"] diff --git a/6.1/windows/LTSC2022/Dockerfile b/6.1/windows/LTSC2022/Dockerfile new file mode 100644 index 00000000..3d85730d --- /dev/null +++ b/6.1/windows/LTSC2022/Dockerfile @@ -0,0 +1,156 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS windows + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV PYTHONIOENCODING UTF-8 + +# Install Git. +# See: git-[version]-[bit].exe /SAVEINF=git.inf and /? +ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.42.0.windows.2/Git-2.42.0.2-64-bit.exe +ARG GIT_SHA256=BD9B41641A258FD16D99BEECEC66132160331D685DFB4C714CEA2BCC78D63BDB +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:GIT}); \ + Invoke-WebRequest -Uri ${env:GIT} -OutFile git.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:GIT_SHA256}); \ + $Hash = Get-FileHash git.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:GIT_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + exit 1; \ + } \ + Write-Host -NoNewLine 'Installing git ... '; \ + $Process = \ + Start-Process git.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + '/SP-', \ + '/VERYSILENT', \ + '/SUPPRESSMSGBOXES', \ + '/NOCANCEL', \ + '/NORESTART', \ + '/CLOSEAPPLICATIONS', \ + '/FORCECLOSEAPPLICATIONS', \ + '/NOICONS', \ + '/COMPONENTS="gitlfs"', \ + '/EditorOption=VIM', \ + '/PathOption=Cmd', \ + '/SSHOption=OpenSSH', \ + '/CURLOption=WinSSL', \ + '/UseCredentialManager=Enabled', \ + '/EnableSymlinks=Enabled', \ + '/EnableFSMonitor=Enabled' \ + ); \ + if ($Process.ExitCode -eq 0) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force git.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Install Python +ARG PY39=https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe +ARG PY39_SHA256=FB3D0466F3754752CA7FD839A09FFE53375FF2C981279FD4BC23A005458F7F5D +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:PY39}); \ + Invoke-WebRequest -Uri ${env:PY39} -OutFile python-3.9.13-amd64.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:PY39_SHA256});\ + $Hash = Get-FileHash python-3.9.13-amd64.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:PY39_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + exit 1; \ + } \ + Write-Host -NoNewLine 'Installing Python ... '; \ + $Process = \ + Start-Process python-3.9.13-amd64.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + 'AssociateFiles=0', \ + 'Include_doc=0', \ + 'Include_debug=0', \ + 'Include_lib=1', \ + 'Include_tcltk=0', \ + 'Include_test=0', \ + 'InstallAllUsers=1', \ + 'InstallLauncherAllUsers=0', \ + 'PrependPath=1', \ + '/quiet' \ + ); \ + if ($Process.ExitCode -eq 0) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force python-3.9.13-amd64.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Install Visual Studio Build Tools +ARG VSB=https://download.visualstudio.microsoft.com/download/pr/5536698c-711c-4834-876f-2817d31a2ef2/c792bdb0fd46155de19955269cac85d52c4c63c23db2cf43d96b9390146f9390/vs_BuildTools.exe +ARG VSB_SHA256=C792BDB0FD46155DE19955269CAC85D52C4C63C23DB2CF43D96B9390146F9390 +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB}); \ + Invoke-WebRequest -Uri ${env:VSB} -OutFile vs_buildtools.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:VSB_SHA256}); \ + $Hash = Get-FileHash vs_buildtools.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:VSB_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + } \ + Write-Host -NoNewLine 'Installing Visual Studio Build Tools ... '; \ + $Process = \ + Start-Process vs_buildtools.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + '--quiet', \ + '--wait', \ + '--norestart', \ + '--nocache', \ + '--add', 'Microsoft.VisualStudio.Component.Windows11SDK.22000', \ + '--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' \ + ); \ + if ($Process.ExitCode -eq 0 -or $Process.ExitCode -eq 3010) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force vs_buildtools.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Install Swift toolchain. +ARG SWIFT=https://download.swift.org/swift-6.1-release/windows10/swift-6.1-RELEASE/swift-6.1-RELEASE-windows10.exe +ARG SWIFT_SHA256=8C8AEF8B4A449EBEEFD74482AC767E269F8CBE7E520871C1D103C7079C5F4C6A +RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT}); \ + Invoke-WebRequest -Uri ${env:SWIFT} -OutFile installer.exe; \ + Write-Host '✓'; \ + Write-Host -NoNewLine ('Verifying SHA256 ({0}) ... ' -f ${env:SWIFT_SHA256}); \ + $Hash = Get-FileHash installer.exe -Algorithm sha256; \ + if ($Hash.Hash -eq ${env:SWIFT_SHA256}) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Hash.Hash); \ + exit 1; \ + } \ + Write-Host -NoNewLine 'Installing Swift ... '; \ + $Process = \ + Start-Process installer.exe -Wait -PassThru -NoNewWindow -ArgumentList @( \ + '/quiet', \ + '/norestart' \ + ); \ + if ($Process.ExitCode -eq 0) { \ + Write-Host '✓'; \ + } else { \ + Write-Host ('✘ ({0})' -f $Process.ExitCode); \ + exit 1; \ + } \ + Remove-Item -Force installer.exe; \ + Remove-Item -ErrorAction SilentlyContinue -Force -Recurse ${env:TEMP}\* + +# Default to powershell +# FIXME: we need to grant ContainerUser the SeCreateSymbolicLinkPrivilege +# privilege so that it can create symbolic links. +# USER ContainerUser +CMD ["powershell.exe", "-nologo", "-ExecutionPolicy", "Bypass"]