# download Swift toolchain ARG SWIFT_WEBROOT #=https://download.swift.org/development ARG SWIFT_PLATFORM #=ubuntu ARG OS_MAJOR_VER #=24 ARG OS_MIN_VER #=04 ARG OS_ARCH_SUFFIX=${TARGETARCH} ARG OS_ARCH_SUFFIX=${OS_ARCH_SUFFIX/amd64/} ARG OS_ARCH_SUFFIX=${OS_ARCH_SUFFIX/arm64/-aarch64} ARG PLATFORM_WEBROOT="${SWIFT_WEBROOT}/${SWIFT_PLATFORM}${OS_MAJOR_VER}${OS_MIN_VER}${OS_ARCH_SUFFIX}" WORKDIR /swift-toolchain # Use ADD to invalidate cache, if latest-build.yml has been changed ADD ${PLATFORM_WEBROOT}/latest-build.yml . RUN --mount=type=cache,sharing=locked,target=/var/cache/apt,id=${TARGETARCH} --mount=type=cache,sharing=locked,target=/var/lib/apt,id=${TARGETARCH} <<EOF # - Grab curl here so we cache better up above apt-get-install ca-certificates curl gnupg2 # - Latest Toolchain info source <(sed -E 's/^([^:]+): +(.*)$/\1="\2"/' latest-build.yml) [[ -n ${dir} && -n ${download} && -n ${download_signature} ]] || exit echo "${dir}" >.swift_tag download_url_base="${PLATFORM_WEBROOT}/${dir}" # - Download the GPG keys, Swift toolchain, and toolchain signature, and verify. export GNUPGHOME=. curl -fLsS --compressed https://swift.org/keys/all-keys.asc | gpg --import --quiet - >/dev/null curl -fLsS "${download_url_base}/${download}" -O "${download_url_base}/${download_signature}" -O gpg --batch --quiet --verify "${download_signature}" "${download}" >/dev/null apt-get-update purge --auto-remove -qq curl gnupg2 >/dev/null ln -sf "${download}" latest_toolchain.tar.gz EOF
SWIFT_WEBROOT
がバージョンによって切り替わる。 main
: [https://download.swift.org/development]
release/6.2
: [https://download.swift.org/swift-6.2-branch] 最新のビルドはlatest-build.yml
に情報が入る。 (edited)