From d9a80084cdf6781dd0fb33abd6b20ca645d30a3c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 30 Aug 2021 13:09:51 -0700 Subject: [PATCH] Add 1.7.0-beta3 --- 1.7-rc/buster/Dockerfile | 73 +++++++++++++++++++ .../windows/windowsservercore-1809/Dockerfile | 40 ++++++++++ .../windowsservercore-ltsc2016/Dockerfile | 40 ++++++++++ update.sh | 3 + 4 files changed, 156 insertions(+) create mode 100644 1.7-rc/buster/Dockerfile create mode 100644 1.7-rc/windows/windowsservercore-1809/Dockerfile create mode 100644 1.7-rc/windows/windowsservercore-ltsc2016/Dockerfile diff --git a/1.7-rc/buster/Dockerfile b/1.7-rc/buster/Dockerfile new file mode 100644 index 0000000..a4de602 --- /dev/null +++ b/1.7-rc/buster/Dockerfile @@ -0,0 +1,73 @@ +FROM debian:buster-slim + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + ca-certificates \ +# ERROR: no download agent available; install curl, wget, or fetch + curl \ + ; \ + rm -rf /var/lib/apt/lists/* + +ENV JULIA_PATH /usr/local/julia +ENV PATH $JULIA_PATH/bin:$PATH + +# https://julialang.org/juliareleases.asc +# Julia (Binary signing key) +ENV JULIA_GPG 3673DF529D9049477F76B37566E3C7DC03D6E495 + +# https://julialang.org/downloads/ +ENV JULIA_VERSION 1.7.0-beta3 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + if ! command -v gpg > /dev/null; then \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + dirmngr \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + fi; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.7.0-beta3.sha256 +# this "case" statement is generated via "update.sh" + dpkgArch="$(dpkg --print-architecture)"; \ + case "${dpkgArch##*-}" in \ +# amd64 + amd64) tarArch='x86_64'; dirArch='x64'; sha256='d960b9cb68cc58e065d0f0303e1080eefc694b7dc9179043ace6bc9ca7d4b1c7' ;; \ +# arm64v8 + arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='02a1191f313bf52eb0014207fbeaffc2c6c8e3f7cdf3d4258b080175ce31da15' ;; \ +# i386 + i386) tarArch='i686'; dirArch='x86'; sha256='a655078780f48a5709cf719c8684aed50d7efe2284a3817f2ff50ecbdb7553b9' ;; \ +# ppc64le + ppc64el) tarArch='ppc64le'; dirArch='ppc64le'; sha256='e74d2a50bb7d0db380737ea3dc5c16d5762813a5d3fcf832bb948d8fc8fa355b' ;; \ + *) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; \ + esac; \ + \ + folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \ + curl -fL -o julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz.asc"; \ + curl -fL -o julia.tar.gz "https://julialang-s3.julialang.org/bin/linux/${dirArch}/${folder}/julia-${JULIA_VERSION}-linux-${tarArch}.tar.gz"; \ + \ + echo "${sha256} *julia.tar.gz" | sha256sum -c -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + command -v gpgconf > /dev/null && gpgconf --kill all; \ + rm -rf "$GNUPGHOME" julia.tar.gz.asc; \ + \ + mkdir "$JULIA_PATH"; \ + tar -xzf julia.tar.gz -C "$JULIA_PATH" --strip-components 1; \ + rm julia.tar.gz; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + \ +# smoke test + julia --version + +CMD ["julia"] diff --git a/1.7-rc/windows/windowsservercore-1809/Dockerfile b/1.7-rc/windows/windowsservercore-1809/Dockerfile new file mode 100644 index 0000000..54f69af --- /dev/null +++ b/1.7-rc/windows/windowsservercore-1809/Dockerfile @@ -0,0 +1,40 @@ +FROM mcr.microsoft.com/windows/servercore:1809 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JULIA_VERSION 1.7.0-beta3 +ENV JULIA_SHA256 824890063b3a5715609ef3141ee6334afe1c0ce0259f1145e0ceb6ab0386af79 + +RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION.Split('.')[0..1] -Join '.')); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:JULIA_SHA256); \ + if ((Get-FileHash julia.exe -Algorithm sha256).Hash -ne $env:JULIA_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Installing ...'; \ + Start-Process -Wait -NoNewWindow \ + -FilePath '.\julia.exe' \ + -ArgumentList @( \ + '/SILENT', \ + '/DIR=C:\julia' \ + ); \ + \ + Write-Host 'Updating PATH ...'; \ + $env:PATH = 'C:\julia\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ("julia --version") ...'; \ + julia --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ + Write-Host 'Complete.' + +CMD ["julia"] diff --git a/1.7-rc/windows/windowsservercore-ltsc2016/Dockerfile b/1.7-rc/windows/windowsservercore-ltsc2016/Dockerfile new file mode 100644 index 0000000..1eee755 --- /dev/null +++ b/1.7-rc/windows/windowsservercore-ltsc2016/Dockerfile @@ -0,0 +1,40 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JULIA_VERSION 1.7.0-beta3 +ENV JULIA_SHA256 824890063b3a5715609ef3141ee6334afe1c0ce0259f1145e0ceb6ab0386af79 + +RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win64.exe' -f $env:JULIA_VERSION, ($env:JULIA_VERSION.Split('.')[0..1] -Join '.')); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:JULIA_SHA256); \ + if ((Get-FileHash julia.exe -Algorithm sha256).Hash -ne $env:JULIA_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Installing ...'; \ + Start-Process -Wait -NoNewWindow \ + -FilePath '.\julia.exe' \ + -ArgumentList @( \ + '/SILENT', \ + '/DIR=C:\julia' \ + ); \ + \ + Write-Host 'Updating PATH ...'; \ + $env:PATH = 'C:\julia\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ("julia --version") ...'; \ + julia --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ + Write-Host 'Complete.' + +CMD ["julia"] diff --git a/update.sh b/update.sh index a81a29e..eababfb 100755 --- a/update.sh +++ b/update.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -Eeuo pipefail +# TODO https://julialang-s3.julialang.org/bin/versions.json ? +# delayed deploys: https://github.com/JuliaLang/julia/issues/38946#issuecomment-749224376 + cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( "$@" )