From 0ac6323a5e562b48f0671a7dcfffcac1b67b5cd7 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Fri, 29 May 2026 09:14:07 -0700 Subject: [PATCH] Add 6.4.x nightly Dockerfilees --- nightly-6.4.x/amazonlinux/2/Dockerfile | 75 +++++++++ nightly-6.4.x/amazonlinux/2/buildx/Dockerfile | 82 ++++++++++ nightly-6.4.x/amazonlinux/2/slim/Dockerfile | 55 +++++++ nightly-6.4.x/amazonlinux/2023/Dockerfile | 78 +++++++++ .../amazonlinux/2023/buildx/Dockerfile | 80 +++++++++ .../amazonlinux/2023/slim/Dockerfile | 60 +++++++ nightly-6.4.x/centos/7/Dockerfile | 95 +++++++++++ nightly-6.4.x/centos/7/slim/Dockerfile | 51 ++++++ nightly-6.4.x/debian/12/Dockerfile | 69 ++++++++ nightly-6.4.x/debian/12/buildx/Dockerfile | 78 +++++++++ nightly-6.4.x/debian/13/Dockerfile | 69 ++++++++ nightly-6.4.x/debian/13/buildx/Dockerfile | 78 +++++++++ nightly-6.4.x/debian/13/slim/Dockerfile | 69 ++++++++ nightly-6.4.x/fedora/39/Dockerfile | 69 ++++++++ nightly-6.4.x/fedora/39/buildx/Dockerfile | 79 +++++++++ nightly-6.4.x/fedora/41/Dockerfile | 69 ++++++++ nightly-6.4.x/fedora/41/buildx/Dockerfile | 79 +++++++++ nightly-6.4.x/rhel-ubi/10/Dockerfile | 68 ++++++++ nightly-6.4.x/rhel-ubi/10/buildx/Dockerfile | 76 +++++++++ nightly-6.4.x/rhel-ubi/10/slim/Dockerfile | 51 ++++++ nightly-6.4.x/rhel-ubi/9/Dockerfile | 67 ++++++++ nightly-6.4.x/rhel-ubi/9/buildx/Dockerfile | 75 +++++++++ nightly-6.4.x/rhel-ubi/9/slim/Dockerfile | 51 ++++++ nightly-6.4.x/ubuntu/22.04/Dockerfile | 78 +++++++++ nightly-6.4.x/ubuntu/22.04/buildx/Dockerfile | 84 ++++++++++ nightly-6.4.x/ubuntu/22.04/slim/Dockerfile | 62 +++++++ nightly-6.4.x/ubuntu/24.04/Dockerfile | 77 +++++++++ nightly-6.4.x/ubuntu/24.04/buildx/Dockerfile | 81 +++++++++ nightly-6.4.x/ubuntu/24.04/slim/Dockerfile | 63 +++++++ nightly-6.4.x/ubuntu/26.04/Dockerfile | 77 +++++++++ nightly-6.4.x/ubuntu/26.04/buildx/Dockerfile | 81 +++++++++ nightly-6.4.x/ubuntu/26.04/slim/Dockerfile | 63 +++++++ nightly-6.4.x/windows/1809/Dockerfile | 154 ++++++++++++++++++ nightly-6.4.x/windows/LTSC2022/Dockerfile | 154 ++++++++++++++++++ nightly-6.4.x/windows/LTSC2025/Dockerfile | 154 ++++++++++++++++++ 35 files changed, 2751 insertions(+) create mode 100644 nightly-6.4.x/amazonlinux/2/Dockerfile create mode 100644 nightly-6.4.x/amazonlinux/2/buildx/Dockerfile create mode 100644 nightly-6.4.x/amazonlinux/2/slim/Dockerfile create mode 100644 nightly-6.4.x/amazonlinux/2023/Dockerfile create mode 100644 nightly-6.4.x/amazonlinux/2023/buildx/Dockerfile create mode 100644 nightly-6.4.x/amazonlinux/2023/slim/Dockerfile create mode 100644 nightly-6.4.x/centos/7/Dockerfile create mode 100644 nightly-6.4.x/centos/7/slim/Dockerfile create mode 100644 nightly-6.4.x/debian/12/Dockerfile create mode 100644 nightly-6.4.x/debian/12/buildx/Dockerfile create mode 100644 nightly-6.4.x/debian/13/Dockerfile create mode 100644 nightly-6.4.x/debian/13/buildx/Dockerfile create mode 100644 nightly-6.4.x/debian/13/slim/Dockerfile create mode 100644 nightly-6.4.x/fedora/39/Dockerfile create mode 100644 nightly-6.4.x/fedora/39/buildx/Dockerfile create mode 100644 nightly-6.4.x/fedora/41/Dockerfile create mode 100644 nightly-6.4.x/fedora/41/buildx/Dockerfile create mode 100644 nightly-6.4.x/rhel-ubi/10/Dockerfile create mode 100644 nightly-6.4.x/rhel-ubi/10/buildx/Dockerfile create mode 100644 nightly-6.4.x/rhel-ubi/10/slim/Dockerfile create mode 100644 nightly-6.4.x/rhel-ubi/9/Dockerfile create mode 100644 nightly-6.4.x/rhel-ubi/9/buildx/Dockerfile create mode 100644 nightly-6.4.x/rhel-ubi/9/slim/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/22.04/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/22.04/buildx/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/22.04/slim/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/24.04/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/24.04/buildx/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/24.04/slim/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/26.04/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/26.04/buildx/Dockerfile create mode 100644 nightly-6.4.x/ubuntu/26.04/slim/Dockerfile create mode 100644 nightly-6.4.x/windows/1809/Dockerfile create mode 100644 nightly-6.4.x/windows/LTSC2022/Dockerfile create mode 100644 nightly-6.4.x/windows/LTSC2025/Dockerfile diff --git a/nightly-6.4.x/amazonlinux/2/Dockerfile b/nightly-6.4.x/amazonlinux/2/Dockerfile new file mode 100644 index 00000000..f7fcc4f1 --- /dev/null +++ b/nightly-6.4.x/amazonlinux/2/Dockerfile @@ -0,0 +1,75 @@ +FROM amazonlinux:2 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + glibc-static \ + gzip \ + libbsd \ + libcurl-devel \ + libedit \ + libicu \ + libsqlite \ + libstdc++-static \ + libuuid \ + libxml2-devel \ + openssl-devel \ + tar \ + tzdata \ + unzip \ + zip \ + zlib-devel + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=amazonlinux +ARG OS_MAJOR_VER=2 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/amazonlinux/2/buildx/Dockerfile b/nightly-6.4.x/amazonlinux/2/buildx/Dockerfile new file mode 100644 index 00000000..3a647275 --- /dev/null +++ b/nightly-6.4.x/amazonlinux/2/buildx/Dockerfile @@ -0,0 +1,82 @@ +FROM amazonlinux:2 AS base +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + glibc-static \ + gzip \ + libbsd \ + libcurl-devel \ + libedit \ + libicu \ + libsqlite \ + libstdc++-static \ + libuuid \ + libxml2-devel \ + openssl-devel \ + tar \ + tzdata \ + unzip \ + zip \ + zlib-devel + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=amazonlinux +ARG OS_MAJOR_VER=2 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX +ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX" + +RUN echo "${PLATFORM_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/amazonlinux/2/slim/Dockerfile b/nightly-6.4.x/amazonlinux/2/slim/Dockerfile new file mode 100644 index 00000000..082c929e --- /dev/null +++ b/nightly-6.4.x/amazonlinux/2/slim/Dockerfile @@ -0,0 +1,55 @@ +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 + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=amazonlinux +ARG OS_MAJOR_VER=2 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && yum -y install tar gzip \ + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && yum autoremove -y tar gzip + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/amazonlinux/2023/Dockerfile b/nightly-6.4.x/amazonlinux/2023/Dockerfile new file mode 100644 index 00000000..4ecaafb0 --- /dev/null +++ b/nightly-6.4.x/amazonlinux/2023/Dockerfile @@ -0,0 +1,78 @@ +FROM amazonlinux:2023 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN dnf -y install \ + binutils \ + gcc \ + git \ + unzip \ + glibc-static \ + gzip \ + libbsd \ + libcurl-devel \ + libedit \ + libicu \ + libstdc++-static \ + libuuid \ + libxml2-devel \ + openssl-devel \ + tar \ + tzdata + +# Bug: https://github.com/amazonlinux/amazon-linux-2023/issues/243 +RUN dnf -y swap gnupg2-minimal gnupg2-full + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=amazonlinux2023 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/amazonlinux/2023/buildx/Dockerfile b/nightly-6.4.x/amazonlinux/2023/buildx/Dockerfile new file mode 100644 index 00000000..edacd617 --- /dev/null +++ b/nightly-6.4.x/amazonlinux/2023/buildx/Dockerfile @@ -0,0 +1,80 @@ +FROM amazonlinux:2023 AS base +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN dnf -y install \ + binutils \ + gcc \ + git \ + unzip \ + glibc-static \ + gzip \ + libbsd \ + libcurl-devel \ + libedit \ + libicu \ + libstdc++-static \ + libuuid \ + libxml2-devel \ + openssl-devel \ + tar \ + tzdata + +# Bug: https://github.com/amazonlinux/amazon-linux-2023/issues/243 +RUN dnf -y swap gnupg2-minimal gnupg2-full + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=amazonlinux2023 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT$OS_ARCH_SUFFIX" + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN echo "${PLATFORM_WEBROOT}/latest-build.yml" + +RUN set -e; \ + export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/amazonlinux/2023/slim/Dockerfile b/nightly-6.4.x/amazonlinux/2023/slim/Dockerfile new file mode 100644 index 00000000..73530960 --- /dev/null +++ b/nightly-6.4.x/amazonlinux/2023/slim/Dockerfile @@ -0,0 +1,60 @@ +FROM amazonlinux:2023 +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 + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=amazonlinux2023 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + ARCH_NAME="$(rpm --eval '%{_arch}')"; \ + case "${ARCH_NAME##*-}" in \ + 'x86_64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'aarch64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + # - Bug: https://github.com/amazonlinux/amazon-linux-2023/issues/243 + dnf -y swap gnupg2-minimal gnupg2-full \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && dnf -y install tar gzip \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && dnf autoremove -y tar gzip + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/centos/7/Dockerfile b/nightly-6.4.x/centos/7/Dockerfile new file mode 100644 index 00000000..61603e2d --- /dev/null +++ b/nightly-6.4.x/centos/7/Dockerfile @@ -0,0 +1,95 @@ +FROM centos:7 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +# CentOS 7 ships with git 1.x which is too old for the toolchain usage, using RH software collections to install git 2.x +RUN yum install -y centos-release-scl-rh + +RUN yum install shadow-utils.x86_64 -y \ + binutils \ + gcc \ + rh-git227-git \ + glibc-static \ + libbsd-devel \ + libcurl-devel \ + libedit \ + libedit-devel \ + libicu-devel \ + libstdc++-static \ + libxml2-devel \ + pkg-config \ + python2 \ + python3 \ + sqlite \ + unzip \ + zip \ + zlib-devel + +# Enable git 2.x from RH software collections for both login and non-login shells +RUN ln -s /opt/rh/rh-git227/enable /etc/profile.d/git.sh +ENV ENV=/etc/profile.d/git.sh +ENV BASH_ENV=$ENV + +RUN sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=centos +ARG OS_MAJOR_VER=7 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fL https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +# The devtoolset-8 that the Swift runtime is built against uses new +# functionality in the backdeploy `libstdc++_noshared.a` in devtoolset-a. +# A linkerscript in the devtoolset ensures that it is picked up appropriately. +# When dynamically linking the runtime, this static archive is merged into the +# shared object. When static linking, the compat library needs to be available +# to be merged into the final shared object/executable. +# +# Symlink it from the devtoolset into the static swift resource directory +RUN yum install -y centos-release-scl +RUN yum install -y devtoolset-8 +RUN ln -s /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++_nonshared.a /usr/lib/swift_static/linux && \ + ln -s /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++.so /usr/lib/swift_static/linux + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/centos/7/slim/Dockerfile b/nightly-6.4.x/centos/7/slim/Dockerfile new file mode 100644 index 00000000..40607fa7 --- /dev/null +++ b/nightly-6.4.x/centos/7/slim/Dockerfile @@ -0,0 +1,51 @@ +FROM centos:7 +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 + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=centos +ARG OS_MAJOR_VER=7 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/debian/12/Dockerfile b/nightly-6.4.x/debian/12/Dockerfile new file mode 100644 index 00000000..a5ef377a --- /dev/null +++ b/nightly-6.4.x/debian/12/Dockerfile @@ -0,0 +1,69 @@ +FROM debian:12 + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils-gold \ + curl \ + gpg \ + 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/* + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=debian12 +ARG SWIFT_VERSION=6.2 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +COPY swift-ci/dependencies/requirements.txt /dependencies/ +RUN pip3 install -r /dependencies/requirements.txt --break-system-packages + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version diff --git a/nightly-6.4.x/debian/12/buildx/Dockerfile b/nightly-6.4.x/debian/12/buildx/Dockerfile new file mode 100644 index 00000000..ef19c9b8 --- /dev/null +++ b/nightly-6.4.x/debian/12/buildx/Dockerfile @@ -0,0 +1,78 @@ +FROM debian:12 as Base + +ENV DEBIAN_FRONTEND="noninteractive" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils-gold \ + curl \ + gpg \ + 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/* + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=debian12 +ARG SWIFT_VERSION=6.2 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version diff --git a/nightly-6.4.x/debian/13/Dockerfile b/nightly-6.4.x/debian/13/Dockerfile new file mode 100644 index 00000000..e38ba39d --- /dev/null +++ b/nightly-6.4.x/debian/13/Dockerfile @@ -0,0 +1,69 @@ +FROM debian:13 + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils-gold \ + curl \ + gpg \ + libicu-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libsqlite3-dev \ + libncurses-dev \ + libpython3-dev \ + libxml2-dev \ + pkg-config \ + uuid-dev \ + tzdata \ + git \ + gcc \ + libstdc++-14-dev \ + && rm -r /var/lib/apt/lists/* + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=debian13 +ARG SWIFT_VERSION=6.4 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +COPY swift-ci/dependencies/requirements.txt /dependencies/ +RUN pip3 install -r /dependencies/requirements.txt --break-system-packages + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version diff --git a/nightly-6.4.x/debian/13/buildx/Dockerfile b/nightly-6.4.x/debian/13/buildx/Dockerfile new file mode 100644 index 00000000..88be05cd --- /dev/null +++ b/nightly-6.4.x/debian/13/buildx/Dockerfile @@ -0,0 +1,78 @@ +FROM debian:13 as Base + +ENV DEBIAN_FRONTEND="noninteractive" + +RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \ + apt-get -q install -y \ + binutils-gold \ + curl \ + gpg \ + libicu-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libsqlite3-dev \ + libncurses-dev \ + libpython3-dev \ + libxml2-dev \ + pkg-config \ + uuid-dev \ + tzdata \ + git \ + gcc \ + libstdc++-14-dev \ + && rm -r /var/lib/apt/lists/* + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=debian13 +ARG SWIFT_VERSION=6.4 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ENV SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version diff --git a/nightly-6.4.x/debian/13/slim/Dockerfile b/nightly-6.4.x/debian/13/slim/Dockerfile new file mode 100644 index 00000000..26183ef7 --- /dev/null +++ b/nightly-6.4.x/debian/13/slim/Dockerfile @@ -0,0 +1,69 @@ +FROM debian:13 + +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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=debian13 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_WEBROOT=$SWIFT_WEBROOT + +RUN set -e; \ + ARCH_NAME="$(dpkg --print-architecture)"; \ + case "${ARCH_NAME##*-}" in \ + 'amd64') \ + OS_ARCH_SUFFIX=''; \ + ;; \ + 'arm64') \ + OS_ARCH_SUFFIX='-aarch64'; \ + ;; \ + *) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \ + esac; \ + # - 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/* \ + # - Latest Toolchain info + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl gpg + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/fedora/39/Dockerfile b/nightly-6.4.x/fedora/39/Dockerfile new file mode 100644 index 00000000..eb428b3e --- /dev/null +++ b/nightly-6.4.x/fedora/39/Dockerfile @@ -0,0 +1,69 @@ +FROM fedora:39 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + zip \ + unzip \ + libcurl-devel \ + libedit-devel \ + libicu-devel \ + sqlite-devel \ + libuuid-devel \ + libxml2-devel \ + python3-devel \ + libstdc++-devel \ + libstdc++-static + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=fedora39 +ARG SWIFT_VERSION=6.2 +ARG SWIFT_BRANCH=swift-${SWIFT_VERSION}-release +ARG SWIFT_TAG=swift-${SWIFT_VERSION}-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_TAG=$SWIFT_TAG \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version \ No newline at end of file diff --git a/nightly-6.4.x/fedora/39/buildx/Dockerfile b/nightly-6.4.x/fedora/39/buildx/Dockerfile new file mode 100644 index 00000000..7add3b49 --- /dev/null +++ b/nightly-6.4.x/fedora/39/buildx/Dockerfile @@ -0,0 +1,79 @@ +FROM fedora:39 AS base +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + zip \ + unzip \ + libcurl-devel \ + libedit-devel \ + libicu-devel \ + sqlite-devel \ + libuuid-devel \ + libxml2-devel \ + python3-devel \ + libstdc++-devel \ + libstdc++-static + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=fedora39 +ARG SWIFT_VERSION=6.2 +ARG SWIFT_BRANCH=swift-${SWIFT_VERSION}-release +ARG SWIFT_TAG=swift-${SWIFT_VERSION}-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_TAG=$SWIFT_TAG \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version \ No newline at end of file diff --git a/nightly-6.4.x/fedora/41/Dockerfile b/nightly-6.4.x/fedora/41/Dockerfile new file mode 100644 index 00000000..fb392132 --- /dev/null +++ b/nightly-6.4.x/fedora/41/Dockerfile @@ -0,0 +1,69 @@ +FROM fedora:41 +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + zip \ + unzip \ + libcurl-devel \ + libedit-devel \ + libicu-devel \ + sqlite-devel \ + libuuid-devel \ + libxml2-devel \ + python3-devel \ + libstdc++-devel \ + libstdc++-static + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=fedora41 +ARG SWIFT_VERSION=6.2 +ARG SWIFT_BRANCH=swift-${SWIFT_VERSION}-release +ARG SWIFT_TAG=swift-${SWIFT_VERSION}-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_TAG=$SWIFT_TAG \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version diff --git a/nightly-6.4.x/fedora/41/buildx/Dockerfile b/nightly-6.4.x/fedora/41/buildx/Dockerfile new file mode 100644 index 00000000..3ccca756 --- /dev/null +++ b/nightly-6.4.x/fedora/41/buildx/Dockerfile @@ -0,0 +1,79 @@ +FROM fedora:41 AS base +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum -y install \ + binutils \ + gcc \ + git \ + zip \ + unzip \ + libcurl-devel \ + libedit-devel \ + libicu-devel \ + sqlite-devel \ + libuuid-devel \ + libxml2-devel \ + python3-devel \ + libstdc++-devel \ + libstdc++-static + + +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=fedora41 +ARG SWIFT_VERSION=6.2 +ARG SWIFT_BRANCH=swift-${SWIFT_VERSION}-release +ARG SWIFT_TAG=swift-${SWIFT_VERSION}-RELEASE +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch +ARG SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM" +ARG SWIFT_PREFIX=/opt/swift/${SWIFT_VERSION} + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + SWIFT_VERSION=$SWIFT_VERSION \ + SWIFT_BRANCH=$SWIFT_BRANCH \ + SWIFT_TAG=$SWIFT_TAG \ + SWIFT_WEBROOT=$SWIFT_WEBROOT \ + SWIFT_PREFIX=$SWIFT_PREFIX + +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; \ + export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${SWIFT_PLATFORM}${OS_ARCH_SUFFIX}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}${OS_ARCH_SUFFIX}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + # - Unpack the toolchain, set libs permissions, and clean up. + && mkdir -p $SWIFT_PREFIX \ + && tar -xzf latest_toolchain.tar.gz --directory $SWIFT_PREFIX --strip-components=1 \ + && chmod -R o+r $SWIFT_PREFIX/usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +ENV PATH="${SWIFT_PREFIX}/usr/bin:${PATH}" + +# Print Installed Swift Version +RUN swift --version diff --git a/nightly-6.4.x/rhel-ubi/10/Dockerfile b/nightly-6.4.x/rhel-ubi/10/Dockerfile new file mode 100644 index 00000000..035cf761 --- /dev/null +++ b/nightly-6.4.x/rhel-ubi/10/Dockerfile @@ -0,0 +1,68 @@ +FROM redhat/ubi10 + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum install -y \ + git \ + gcc-c++ \ + gnupg2 \ + 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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2023-11-08] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubi +ARG OS_MAJOR_VER=10 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fL https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/rhel-ubi/10/buildx/Dockerfile b/nightly-6.4.x/rhel-ubi/10/buildx/Dockerfile new file mode 100644 index 00000000..87a16ee3 --- /dev/null +++ b/nightly-6.4.x/rhel-ubi/10/buildx/Dockerfile @@ -0,0 +1,76 @@ +FROM redhat/ubi10 AS base +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum install -y \ + git \ + gcc-c++ \ + gnupg2 \ + 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 + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubi +ARG OS_MAJOR_VER=10 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX +ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX" + +RUN echo "${PLATFORM_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/rhel-ubi/10/slim/Dockerfile b/nightly-6.4.x/rhel-ubi/10/slim/Dockerfile new file mode 100644 index 00000000..ed06e2da --- /dev/null +++ b/nightly-6.4.x/rhel-ubi/10/slim/Dockerfile @@ -0,0 +1,51 @@ +FROM redhat/ubi10 +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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2023-11-08] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubi +ARG OS_MAJOR_VER=10 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/rhel-ubi/9/Dockerfile b/nightly-6.4.x/rhel-ubi/9/Dockerfile new file mode 100644 index 00000000..a52707f1 --- /dev/null +++ b/nightly-6.4.x/rhel-ubi/9/Dockerfile @@ -0,0 +1,67 @@ +FROM redhat/ubi9 + +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum install -y \ + 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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2023-11-08] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubi +ARG OS_MAJOR_VER=9 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fL https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/rhel-ubi/9/buildx/Dockerfile b/nightly-6.4.x/rhel-ubi/9/buildx/Dockerfile new file mode 100644 index 00000000..aedc3144 --- /dev/null +++ b/nightly-6.4.x/rhel-ubi/9/buildx/Dockerfile @@ -0,0 +1,75 @@ +FROM redhat/ubi9 AS base +LABEL maintainer="Swift Infrastructure " +LABEL description="Docker Container for the Swift programming language" + +RUN yum install -y \ + 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 + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubi +ARG OS_MAJOR_VER=9 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX +ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_ARCH_SUFFIX" + +RUN echo "${PLATFORM_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd + +RUN echo 'source /etc/bashrc' >> /root/.bashrc diff --git a/nightly-6.4.x/rhel-ubi/9/slim/Dockerfile b/nightly-6.4.x/rhel-ubi/9/slim/Dockerfile new file mode 100644 index 00000000..8d2bc556 --- /dev/null +++ b/nightly-6.4.x/rhel-ubi/9/slim/Dockerfile @@ -0,0 +1,51 @@ +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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2023-11-08] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubi +ARG OS_MAJOR_VER=9 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - Latest Toolchain info + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/22.04/Dockerfile b/nightly-6.4.x/ubuntu/22.04/Dockerfile new file mode 100644 index 00000000..9f181428 --- /dev/null +++ b/nightly-6.4.x/ubuntu/22.04/Dockerfile @@ -0,0 +1,78 @@ +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 \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libedit2 \ + libgcc-11-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-11-dev \ + libxml2-dev \ + libz3-dev \ + pkg-config \ + tzdata \ + zip \ + zlib1g-dev \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=22 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_MIN_VER=$OS_MIN_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - 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/* \ + # - Latest Toolchain info + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/22.04/buildx/Dockerfile b/nightly-6.4.x/ubuntu/22.04/buildx/Dockerfile new file mode 100644 index 00000000..97d404b0 --- /dev/null +++ b/nightly-6.4.x/ubuntu/22.04/buildx/Dockerfile @@ -0,0 +1,84 @@ +FROM ubuntu:22.04 AS base +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 \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libedit2 \ + libgcc-11-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-11-dev \ + libxml2-dev \ + libz3-dev \ + pkg-config \ + tzdata \ + zip \ + zlib1g-dev \ + && rm -r /var/lib/apt/lists/* + +# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=22 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER$OS_ARCH_SUFFIX +ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER$OS_ARCH_SUFFIX" + +RUN echo "${PLATFORM_WEBROOT}/latest-build.yml" + +RUN set -e; \ + # - 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/* \ + # - Latest Toolchain info + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/22.04/slim/Dockerfile b/nightly-6.4.x/ubuntu/22.04/slim/Dockerfile new file mode 100644 index 00000000..d610d9d2 --- /dev/null +++ b/nightly-6.4.x/ubuntu/22.04/slim/Dockerfile @@ -0,0 +1,62 @@ +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 + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=22 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_MIN_VER=$OS_MIN_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER" + +RUN set -e; \ + # - 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/* \ + # - Latest Toolchain info + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl gnupg + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/24.04/Dockerfile b/nightly-6.4.x/ubuntu/24.04/Dockerfile new file mode 100644 index 00000000..e107997d --- /dev/null +++ b/nightly-6.4.x/ubuntu/24.04/Dockerfile @@ -0,0 +1,77 @@ +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 \ + curl \ + git \ + unzip \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libncurses5-dev \ + libedit2 \ + libgcc-13-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-13-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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 + +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=24 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_MIN_VER=$OS_MIN_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/24.04/buildx/Dockerfile b/nightly-6.4.x/ubuntu/24.04/buildx/Dockerfile new file mode 100644 index 00000000..632c7d87 --- /dev/null +++ b/nightly-6.4.x/ubuntu/24.04/buildx/Dockerfile @@ -0,0 +1,81 @@ +FROM ubuntu:24.04 AS base +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 \ + curl \ + git \ + unzip \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libncurses5-dev \ + libedit2 \ + libgcc-13-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-13-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 + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=24 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER$OS_ARCH_SUFFIX +ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER$OS_ARCH_SUFFIX" + +RUN echo "${PLATFORM_WEBROOT}/latest-build.yml" + +RUN set -e; \ + export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/24.04/slim/Dockerfile b/nightly-6.4.x/ubuntu/24.04/slim/Dockerfile new file mode 100644 index 00000000..90653f9f --- /dev/null +++ b/nightly-6.4.x/ubuntu/24.04/slim/Dockerfile @@ -0,0 +1,63 @@ +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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=24 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_MIN_VER=$OS_MIN_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER" + +RUN set -e; \ + # - 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/* \ + # - Latest Toolchain info + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl gnupg + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/26.04/Dockerfile b/nightly-6.4.x/ubuntu/26.04/Dockerfile new file mode 100644 index 00000000..36563b16 --- /dev/null +++ b/nightly-6.4.x/ubuntu/26.04/Dockerfile @@ -0,0 +1,77 @@ +FROM ubuntu:resolute +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 \ + binutils-gold \ + curl \ + git \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libncurses5-dev \ + libedit2 \ + libgcc-15-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-15-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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 + +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=26 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_MIN_VER=$OS_MIN_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER" + +RUN echo "${SWIFT_WEBROOT}/latest-build.yml" + +RUN set -e; \ + export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/26.04/buildx/Dockerfile b/nightly-6.4.x/ubuntu/26.04/buildx/Dockerfile new file mode 100644 index 00000000..5b868d73 --- /dev/null +++ b/nightly-6.4.x/ubuntu/26.04/buildx/Dockerfile @@ -0,0 +1,81 @@ +FROM ubuntu:resolute AS base +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 \ + binutils-gold \ + curl \ + git \ + gnupg2 \ + libc6-dev \ + libcurl4-openssl-dev \ + libncurses5-dev \ + libedit2 \ + libgcc-15-dev \ + libpython3-dev \ + libsqlite3-0 \ + libstdc++-15-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 + +# gpg --keyid-format LONG -k FAF6989E1BC16FEA +# pub rsa4096/FAF6989E1BC16FEA 2019-11-07 [SC] [expires: 2021-11-06] +# 8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +# uid [ unknown] Swift Automatic Signing Key #3 +ARG SWIFT_SIGNING_KEY=8A7495662C3CD4AE18D95637FAF6989E1BC16FEA +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=26 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +# This is a small trick to enable if/else for arm64 and amd64. +# Because of https://bugs.swift.org/browse/SR-14872 we need adjust tar options. +FROM base AS base-amd64 +ARG OS_ARCH_SUFFIX= + +FROM base AS base-arm64 +ARG OS_ARCH_SUFFIX=-aarch64 + +FROM base-$TARGETARCH AS final + +ARG OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER$OS_ARCH_SUFFIX +ARG PLATFORM_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER$OS_ARCH_SUFFIX" + +RUN echo "${PLATFORM_WEBROOT}/latest-build.yml" + +RUN set -e; \ + export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${PLATFORM_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${PLATFORM_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + && chmod -R o+r /usr/lib/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl + +# Print Installed Swift Version +RUN swift --version + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/ubuntu/26.04/slim/Dockerfile b/nightly-6.4.x/ubuntu/26.04/slim/Dockerfile new file mode 100644 index 00000000..8b62cc41 --- /dev/null +++ b/nightly-6.4.x/ubuntu/26.04/slim/Dockerfile @@ -0,0 +1,63 @@ +FROM ubuntu:resolute + +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 + +# gpg --keyid-format LONG -k F167DF1ACF9CE069 +# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09] +# E813C892820A6FA13755B268F167DF1ACF9CE069 +# uid [ unknown] Swift Automatic Signing Key #4 +ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069 +ARG SWIFT_PLATFORM=ubuntu +ARG OS_MAJOR_VER=26 +ARG OS_MIN_VER=04 +ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.4.x-branch + +ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \ + SWIFT_PLATFORM=$SWIFT_PLATFORM \ + OS_MAJOR_VER=$OS_MAJOR_VER \ + OS_MIN_VER=$OS_MIN_VER \ + OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \ + SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER" + +RUN set -e; \ + # - 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/* \ + # - Latest Toolchain info + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \ + && export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \ + && export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \ + && echo $DOWNLOAD_DIR > .swift_tag \ + # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \ + ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \ + && curl -fSsL --compressed https://swift.org/keys/all-keys.asc | gpg --import - \ + && gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + # - Unpack the toolchain, set libs permissions, and clean up. + && tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \ + ${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \ + && chmod -R o+r /usr/lib/swift /usr/libexec/swift \ + && rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \ + && apt-get purge --auto-remove -y curl gnupg + +RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \ + ( \ + printf "################################################################\n"; \ + printf "# %-60s #\n" ""; \ + printf "# %-60s #\n" "Swift Nightly Docker Image"; \ + printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \ + printf "# %-60s #\n" ""; \ + printf "################################################################\n" \ + ) > /etc/motd diff --git a/nightly-6.4.x/windows/1809/Dockerfile b/nightly-6.4.x/windows/1809/Dockerfile new file mode 100644 index 00000000..eb861d21 --- /dev/null +++ b/nightly-6.4.x/windows/1809/Dockerfile @@ -0,0 +1,154 @@ +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 +ENV PYTHONUTF8=1 + +# Enable Developer Mode. +RUN reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1" +# Enable Long Paths +RUN reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /t REG_DWORD /f /v "LongPathsEnabled" /d "1" + +# Install Git. +# See: git-[version]-[bit].exe /SAVEINF=git.inf and /? +ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/Git-2.49.0-64-bit.exe +ARG GIT_SHA256=726056328967F242FE6E9AFBFE7823903A928AFF577DCF6F517F2FB6DA6CE83C +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/ae7ac791-9759-4076-bba7-47ff510c57af/a783199025439d65f310bff041e278b966a6dbed8dbcd7fc96b55389f574ef41/vs_BuildTools.exe +ARG VSB_SHA256=A783199025439D65F310BFF041E278B966A6DBED8DBCD7FC96B55389F574EF41 +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); \ + exit 1; \ + } \ + 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_RELEASE_METADATA=http://download.swift.org/swift-6.4.x-branch/windows10/latest-build.json +RUN $env:Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA}; \ + $env:SWIFT_URL = "\"https://download.swift.org/swift-6.4.x-branch/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)\""; \ + Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT_URL}); \ + Invoke-WebRequest -Uri ${env:SWIFT_URL} -OutFile installer.exe; \ + Write-Host '✓'; \ + 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}\* + +# FIXME: we should use a non-Administrator user +# USER ContainerUser +CMD ["powershell.exe", "-nologo", "-ExecutionPolicy", "Bypass"] diff --git a/nightly-6.4.x/windows/LTSC2022/Dockerfile b/nightly-6.4.x/windows/LTSC2022/Dockerfile new file mode 100644 index 00000000..087cc5cb --- /dev/null +++ b/nightly-6.4.x/windows/LTSC2022/Dockerfile @@ -0,0 +1,154 @@ +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 +ENV PYTHONUTF8=1 + +# Enable Developer Mode. +RUN reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1" +# Enable Long Paths +RUN reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /t REG_DWORD /f /v "LongPathsEnabled" /d "1" + +# Install Git. +# See: git-[version]-[bit].exe /SAVEINF=git.inf and /? +ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/Git-2.49.0-64-bit.exe +ARG GIT_SHA256=726056328967F242FE6E9AFBFE7823903A928AFF577DCF6F517F2FB6DA6CE83C +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/ae7ac791-9759-4076-bba7-47ff510c57af/a783199025439d65f310bff041e278b966a6dbed8dbcd7fc96b55389f574ef41/vs_BuildTools.exe +ARG VSB_SHA256=A783199025439D65F310BFF041E278B966A6DBED8DBCD7FC96B55389F574EF41 +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); \ + exit 1; \ + } \ + 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_RELEASE_METADATA=http://download.swift.org/swift-6.4.x-branch/windows10/latest-build.json +RUN $env:Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA}; \ + $env:SWIFT_URL = "\"https://download.swift.org/swift-6.4.x-branch/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$($($env:Release | ConvertFrom-JSON).download)\""; \ + Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:SWIFT_URL}); \ + Invoke-WebRequest -Uri ${env:SWIFT_URL} -OutFile installer.exe; \ + Write-Host '✓'; \ + 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}\* + +# FIXME: we should use a non-Administrator user +# USER ContainerUser +CMD ["powershell.exe", "-nologo", "-ExecutionPolicy", "Bypass"] diff --git a/nightly-6.4.x/windows/LTSC2025/Dockerfile b/nightly-6.4.x/windows/LTSC2025/Dockerfile new file mode 100644 index 00000000..6f2d8f7a --- /dev/null +++ b/nightly-6.4.x/windows/LTSC2025/Dockerfile @@ -0,0 +1,154 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2025 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 +ENV PYTHONUTF8=1 + +# Enable Developer Mode. +RUN reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1" +# Enable Long Paths +RUN reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /t REG_DWORD /f /v "LongPathsEnabled" /d "1" + +# Install Git. +# See: git-[version]-[bit].exe /SAVEINF=git.inf and /? +ARG GIT=https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/Git-2.48.1-64-bit.exe +ARG GIT_SHA256=CE45E23275049F4B36EDD90D5FD986A1E230EFB6C511E9260A90176CE8E825DF +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://aka.ms/vs/17/release/vs_buildtools.exe +ARG VSB_SHA256=15A2A6591B1E91B63E9909864FCBC68459EB26124B814618947215F754CD9CEE +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.26100', \ + '--add', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', \ + '--add', 'Microsoft.VisualStudio.Component.VC.Tools.ARM64' \ + ); \ + 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_RELEASE_METADATA=https://download.swift.org/swift-6.4.x-branch/windows10/latest-build.json +RUN $Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA} | ConvertFrom-JSON; \ + $SWIFT_URL = "\"https://download.swift.org/swift-6.4.x-branch/windows10/$($Release.dir)/$($Release.download)\""; \ + Write-Host -NoNewLine ('Downloading {0} ... ' -f ${SWIFT_URL}); \ + Invoke-WebRequest -Uri ${SWIFT_URL} -OutFile installer.exe; \ + Write-Host '✓'; \ + 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}\* + +# FIXME: we should use a non-Administrator user +# USER ContainerUser +CMD ["powershell.exe", "-nologo", "-ExecutionPolicy", "Bypass"]