diff --git a/.architectures-lib b/.architectures-lib deleted file mode 100644 index ddfc2fe3..00000000 --- a/.architectures-lib +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -_awkArch() { - local version="$1"; shift - local awkExpr="$1"; shift - local file="$version/release-architectures" - [ -f "$file" ] || file='release-architectures' - awk "$@" "/^#|^\$/ { next } $awkExpr" "$file" -} - -dpkgArches() { - local version="$1"; shift - _awkArch "$version" '{ print $2 }' -} - -hasBashbrewArch() { - local version="$1"; shift - local bashbrewArch="$1"; shift - _awkArch "$version" 'BEGIN { exitCode = 1 } $1 == bashbrewArch { exitCode = 0 } END { exit exitCode }' -v bashbrewArch="$bashbrewArch" -} - -dpkgToBashbrewArch() { - local version="$1"; shift - local dpkgArch="$1"; shift - _awkArch "$version" '$2 == dpkgArch { print $1; exit }' -v dpkgArch="$dpkgArch" -} - -dpkgToJuliaTarArch() { - local version="$1"; shift - local dpkgArch="$1"; shift - _awkArch "$version" '$2 == dpkgArch { print $3; exit }' -v dpkgArch="$dpkgArch" -} - -dpkgToJuliaDirArch() { - local version="$1"; shift - local dpkgArch="$1"; shift - _awkArch "$version" '$2 == dpkgArch { print $4; exit }' -v dpkgArch="$dpkgArch" -} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..14a11226 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +/*/**/Dockerfile linguist-generated +/*/**/docker-entrypoint.sh linguist-generated +/Dockerfile*.template linguist-language=Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d85dc80d..cfb2e5cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,16 +18,16 @@ jobs: outputs: strategy: ${{ steps.generate-jobs.outputs.strategy }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 + - uses: docker-library/bashbrew@HEAD - id: generate-jobs name: Generate Jobs run: | - git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew - strategy="$(~/bashbrew/scripts/github-actions/generate.sh)" - strategy="$(~/bashbrew/scripts/github-actions/munge-i386.sh -c <<<"$strategy")" + strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" + strategy="$("$BASHBREW_SCRIPTS/github-actions/munge-i386.sh" -c <<<"$strategy")" strategy="$(jq -c <<<"$strategy" '.matrix.include = [ .matrix.include[] | select(.name | test("alpine.*i386") | not) ]')" # Alpine releases do not exist for i386 + echo "strategy=$strategy" >> "$GITHUB_OUTPUT" jq . <<<"$strategy" # sanity check / debugging aid - echo "::set-output name=strategy::$strategy" test: needs: generate-jobs @@ -35,7 +35,7 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Prepare Environment run: ${{ matrix.runs.prepare }} - name: Pull Dependencies diff --git a/.github/workflows/verify-templating.yml b/.github/workflows/verify-templating.yml new file mode 100644 index 00000000..e822ba6b --- /dev/null +++ b/.github/workflows/verify-templating.yml @@ -0,0 +1,19 @@ +name: Verify Templating + +on: + pull_request: + push: + workflow_dispatch: + +defaults: + run: + shell: 'bash -Eeuo pipefail -x {0}' + +jobs: + apply-templates: + name: Check For Uncomitted Changes + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: ./apply-templates.sh + - run: git diff --exit-code diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..d548f66d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.jq-template.awk diff --git a/1.0/bullseye/Dockerfile b/1.0/bullseye/Dockerfile deleted file mode 100644 index 2441a8fd..00000000 --- a/1.0/bullseye/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -FROM debian:bullseye-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.0.5 - -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.0.5.sha256 -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ -# amd64 - amd64) tarArch='x86_64'; dirArch='x64'; sha256='9dedd613777ba6ebd8aee5796915ff50aa6188ea03ed143cb687fc2aefd76b03' ;; \ -# arm32v7 - armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='cfb2712765db90f0e4fa27e57a88c6d994ebcf1781f8673ebb17b5df7962d0c5' ;; \ -# arm64v8 - arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='41cea1336ed8861413bb945740e567360e26f241eb3e10b3bb0fccd25655ed28' ;; \ -# i386 - i386) tarArch='i686'; dirArch='x86'; sha256='67c8f31699b79df96ce95926a363cd24ffa5bb4d9a814e071b1e8c8ff33e5a8f' ;; \ - *) 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.0/buster/Dockerfile b/1.0/buster/Dockerfile deleted file mode 100644 index e1af0260..00000000 --- a/1.0/buster/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -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.0.5 - -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.0.5.sha256 -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ -# amd64 - amd64) tarArch='x86_64'; dirArch='x64'; sha256='9dedd613777ba6ebd8aee5796915ff50aa6188ea03ed143cb687fc2aefd76b03' ;; \ -# arm32v7 - armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='cfb2712765db90f0e4fa27e57a88c6d994ebcf1781f8673ebb17b5df7962d0c5' ;; \ -# arm64v8 - arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='41cea1336ed8861413bb945740e567360e26f241eb3e10b3bb0fccd25655ed28' ;; \ -# i386 - i386) tarArch='i686'; dirArch='x86'; sha256='67c8f31699b79df96ce95926a363cd24ffa5bb4d9a814e071b1e8c8ff33e5a8f' ;; \ - *) 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.0/windows/windowsservercore-1809/Dockerfile b/1.0/windows/windowsservercore-1809/Dockerfile deleted file mode 100644 index 45f7fbd8..00000000 --- a/1.0/windows/windowsservercore-1809/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -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.0.5 -ENV JULIA_SHA256 83c04bdc264e7ab87f4e22be9f3dff8c5a62a49c8edea6a0c85f4645d4cbac7a - -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 @( \ - '/S', \ - '/D=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.0/windows/windowsservercore-ltsc2016/Dockerfile b/1.0/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index fdce3743..00000000 --- a/1.0/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -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.0.5 -ENV JULIA_SHA256 83c04bdc264e7ab87f4e22be9f3dff8c5a62a49c8edea6a0c85f4645d4cbac7a - -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 @( \ - '/S', \ - '/D=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.10/alpine3.22/Dockerfile b/1.10/alpine3.22/Dockerfile new file mode 100644 index 00000000..7484e559 --- /dev/null +++ b/1.10/alpine3.22/Dockerfile @@ -0,0 +1,59 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM alpine:3.22 + +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.10.10 + +RUN set -eux; \ + \ + apk add --no-cache --virtual .fetch-deps gnupg; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.10.10.sha256 + arch="$(apk --print-arch)"; \ + case "$arch" in \ + 'x86_64') \ + url='https://julialang-s3.julialang.org/bin/musl/x64/1.10/julia-1.10.10-musl-x86_64.tar.gz'; \ + sha256='2d109f3f96f2be8ea45a0676f506642c20d972aeb3d526e8fa10ed49c0d6c786'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + wget -O julia.tar.gz.asc "$url.asc"; \ + wget -O julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum -w -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; \ + 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; \ + \ + apk del --no-network .fetch-deps; \ + \ +# smoke test + julia --version + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/1.10/alpine3.22/docker-entrypoint.sh b/1.10/alpine3.22/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/1.10/alpine3.22/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/1.10/alpine3.23/Dockerfile b/1.10/alpine3.23/Dockerfile new file mode 100644 index 00000000..e57c0612 --- /dev/null +++ b/1.10/alpine3.23/Dockerfile @@ -0,0 +1,59 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM alpine:3.23 + +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.10.10 + +RUN set -eux; \ + \ + apk add --no-cache --virtual .fetch-deps gnupg; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.10.10.sha256 + arch="$(apk --print-arch)"; \ + case "$arch" in \ + 'x86_64') \ + url='https://julialang-s3.julialang.org/bin/musl/x64/1.10/julia-1.10.10-musl-x86_64.tar.gz'; \ + sha256='2d109f3f96f2be8ea45a0676f506642c20d972aeb3d526e8fa10ed49c0d6c786'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + wget -O julia.tar.gz.asc "$url.asc"; \ + wget -O julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum -w -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; \ + 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; \ + \ + apk del --no-network .fetch-deps; \ + \ +# smoke test + julia --version + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/1.10/alpine3.23/docker-entrypoint.sh b/1.10/alpine3.23/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/1.10/alpine3.23/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/1.10/bookworm/Dockerfile b/1.10/bookworm/Dockerfile new file mode 100644 index 00000000..8f168a79 --- /dev/null +++ b/1.10/bookworm/Dockerfile @@ -0,0 +1,87 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:bookworm-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.10.10 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.10.10.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.10-linux-x86_64.tar.gz'; \ + sha256='6a78a03a71c7ab792e8673dc5cedb918e037f081ceb58b50971dfb7c64c5bf81'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.10/julia-1.10.10-linux-i686.tar.gz'; \ + sha256='32186f38e7f6c7830375da1d1327bec3b187d93e3f0ff007829f20f578fd8c35'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.10/julia-1.10.10-linux-aarch64.tar.gz'; \ + sha256='a4b157ed68da10471ea86acc05a0ab61c1a6931ee592a9b236be227d72da50ff'; \ + ;; \ + 'ppc64el') \ + url='https://julialang-s3.julialang.org/bin/linux/ppc64le/1.10/julia-1.10.10-linux-ppc64le.tar.gz'; \ + sha256='f47516c511f100670cad72f3c7a1d95d2c20862f1aa14b1162b0b90424167f16'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/1.10/bookworm/docker-entrypoint.sh b/1.10/bookworm/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/1.10/bookworm/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/1.10/trixie/Dockerfile b/1.10/trixie/Dockerfile new file mode 100644 index 00000000..3bb5e345 --- /dev/null +++ b/1.10/trixie/Dockerfile @@ -0,0 +1,87 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:trixie-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.10.10 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.10.10.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.10-linux-x86_64.tar.gz'; \ + sha256='6a78a03a71c7ab792e8673dc5cedb918e037f081ceb58b50971dfb7c64c5bf81'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.10/julia-1.10.10-linux-i686.tar.gz'; \ + sha256='32186f38e7f6c7830375da1d1327bec3b187d93e3f0ff007829f20f578fd8c35'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.10/julia-1.10.10-linux-aarch64.tar.gz'; \ + sha256='a4b157ed68da10471ea86acc05a0ab61c1a6931ee592a9b236be227d72da50ff'; \ + ;; \ + 'ppc64el') \ + url='https://julialang-s3.julialang.org/bin/linux/ppc64le/1.10/julia-1.10.10-linux-ppc64le.tar.gz'; \ + sha256='f47516c511f100670cad72f3c7a1d95d2c20862f1aa14b1162b0b90424167f16'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/1.10/trixie/docker-entrypoint.sh b/1.10/trixie/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/1.10/trixie/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/1.0/windows/windowsservercore-ltsc2022/Dockerfile b/1.10/windows/servercore-ltsc2022/Dockerfile similarity index 69% rename from 1.0/windows/windowsservercore-ltsc2022/Dockerfile rename to 1.10/windows/servercore-ltsc2022/Dockerfile index f6418589..54f1aff9 100644 --- a/1.0/windows/windowsservercore-ltsc2022/Dockerfile +++ b/1.10/windows/servercore-ltsc2022/Dockerfile @@ -1,15 +1,21 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM mcr.microsoft.com/windows/servercore:ltsc2022 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV JULIA_VERSION 1.0.5 -ENV JULIA_SHA256 83c04bdc264e7ab87f4e22be9f3dff8c5a62a49c8edea6a0c85f4645d4cbac7a +ENV JULIA_VERSION 1.10.10 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.10/julia-1.10.10-win64.exe +ENV JULIA_SHA256 c2a9087064a193e8c2219cc03fac2264445bc9ccf626e30acc39ebd5fa7ad09f -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); \ +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + Invoke-WebRequest -Uri $env:JULIA_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) { \ @@ -21,10 +27,13 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 Start-Process -Wait -NoNewWindow \ -FilePath '.\julia.exe' \ -ArgumentList @( \ - '/S', \ - '/D=C:\julia' \ + '/SILENT', \ + '/DIR=C:\julia' \ ); \ \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ Write-Host 'Updating PATH ...'; \ $env:PATH = 'C:\julia\bin;' + $env:PATH; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ @@ -32,9 +41,6 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 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-1809/Dockerfile b/1.10/windows/servercore-ltsc2025/Dockerfile similarity index 68% rename from 1.7-rc/windows/windowsservercore-1809/Dockerfile rename to 1.10/windows/servercore-ltsc2025/Dockerfile index be979ea9..3298330b 100644 --- a/1.7-rc/windows/windowsservercore-1809/Dockerfile +++ b/1.10/windows/servercore-ltsc2025/Dockerfile @@ -1,15 +1,21 @@ -FROM mcr.microsoft.com/windows/servercore:1809 +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV JULIA_VERSION 1.7.0-rc3 -ENV JULIA_SHA256 d48563b3faeeb0d937177f989f5c8bfe79552ac11255000870ce770a97c69de8 +ENV JULIA_VERSION 1.10.10 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.10/julia-1.10.10-win64.exe +ENV JULIA_SHA256 c2a9087064a193e8c2219cc03fac2264445bc9ccf626e30acc39ebd5fa7ad09f -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); \ +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + Invoke-WebRequest -Uri $env:JULIA_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) { \ @@ -25,6 +31,9 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 '/DIR=C:\julia' \ ); \ \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ Write-Host 'Updating PATH ...'; \ $env:PATH = 'C:\julia\bin;' + $env:PATH; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ @@ -32,9 +41,6 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 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.11/bookworm/Dockerfile b/1.11/bookworm/Dockerfile new file mode 100644 index 00000000..fd6d4730 --- /dev/null +++ b/1.11/bookworm/Dockerfile @@ -0,0 +1,87 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:bookworm-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.11.9 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.11.9.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.9-linux-x86_64.tar.gz'; \ + sha256='b36363356d7a05eaf8b7b9e7a91c710f6bd3d2940be4d4e6d14b9a9f2927de35'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.11/julia-1.11.9-linux-i686.tar.gz'; \ + sha256='74df5031a93bce45e30582a71bf70f4ba983ff42f6eaf54eb9effb6e124604ca'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.11/julia-1.11.9-linux-aarch64.tar.gz'; \ + sha256='a2071f0654d1d6af4381cba650b9f790f5f8bb7a570e51e378de8bcf67ff623e'; \ + ;; \ + 'ppc64el') \ + url='https://julialang-s3.julialang.org/bin/linux/ppc64le/1.11/julia-1.11.9-linux-ppc64le.tar.gz'; \ + sha256='3c25d5bf70d65da5859d65b34d17646dd1b3f1b50ea2090d13e63171d6dbf861'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/1.11/bookworm/docker-entrypoint.sh b/1.11/bookworm/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/1.11/bookworm/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/1.11/trixie/Dockerfile b/1.11/trixie/Dockerfile new file mode 100644 index 00000000..2351d7db --- /dev/null +++ b/1.11/trixie/Dockerfile @@ -0,0 +1,87 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:trixie-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.11.9 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.11.9.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.9-linux-x86_64.tar.gz'; \ + sha256='b36363356d7a05eaf8b7b9e7a91c710f6bd3d2940be4d4e6d14b9a9f2927de35'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.11/julia-1.11.9-linux-i686.tar.gz'; \ + sha256='74df5031a93bce45e30582a71bf70f4ba983ff42f6eaf54eb9effb6e124604ca'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.11/julia-1.11.9-linux-aarch64.tar.gz'; \ + sha256='a2071f0654d1d6af4381cba650b9f790f5f8bb7a570e51e378de8bcf67ff623e'; \ + ;; \ + 'ppc64el') \ + url='https://julialang-s3.julialang.org/bin/linux/ppc64le/1.11/julia-1.11.9-linux-ppc64le.tar.gz'; \ + sha256='3c25d5bf70d65da5859d65b34d17646dd1b3f1b50ea2090d13e63171d6dbf861'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/1.11/trixie/docker-entrypoint.sh b/1.11/trixie/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/1.11/trixie/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/1.7-rc/windows/windowsservercore-ltsc2022/Dockerfile b/1.11/windows/servercore-ltsc2022/Dockerfile similarity index 71% rename from 1.7-rc/windows/windowsservercore-ltsc2022/Dockerfile rename to 1.11/windows/servercore-ltsc2022/Dockerfile index 9108017f..6092995e 100644 --- a/1.7-rc/windows/windowsservercore-ltsc2022/Dockerfile +++ b/1.11/windows/servercore-ltsc2022/Dockerfile @@ -1,15 +1,21 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM mcr.microsoft.com/windows/servercore:ltsc2022 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV JULIA_VERSION 1.7.0-rc3 -ENV JULIA_SHA256 d48563b3faeeb0d937177f989f5c8bfe79552ac11255000870ce770a97c69de8 +ENV JULIA_VERSION 1.11.9 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.11/julia-1.11.9-win64.exe +ENV JULIA_SHA256 747ff8983fa183e0e35e618c9212815cba0b3ad29a44eaac039acc755a0d91b6 -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); \ +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + Invoke-WebRequest -Uri $env:JULIA_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) { \ @@ -25,6 +31,9 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 '/DIR=C:\julia' \ ); \ \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ Write-Host 'Updating PATH ...'; \ $env:PATH = 'C:\julia\bin;' + $env:PATH; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ @@ -32,9 +41,6 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 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.6/windows/windowsservercore-ltsc2016/Dockerfile b/1.11/windows/servercore-ltsc2025/Dockerfile similarity index 68% rename from 1.6/windows/windowsservercore-ltsc2016/Dockerfile rename to 1.11/windows/servercore-ltsc2025/Dockerfile index 2cb1e68d..386a9e55 100644 --- a/1.6/windows/windowsservercore-ltsc2016/Dockerfile +++ b/1.11/windows/servercore-ltsc2025/Dockerfile @@ -1,15 +1,21 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2016 +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV JULIA_VERSION 1.6.4 -ENV JULIA_SHA256 c9b6ecdad4feb57e5af12c9ef1a74993a96edbf87a4dc521d57e338397cee9b2 +ENV JULIA_VERSION 1.11.9 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.11/julia-1.11.9-win64.exe +ENV JULIA_SHA256 747ff8983fa183e0e35e618c9212815cba0b3ad29a44eaac039acc755a0d91b6 -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); \ +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + Invoke-WebRequest -Uri $env:JULIA_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) { \ @@ -25,6 +31,9 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 '/DIR=C:\julia' \ ); \ \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ Write-Host 'Updating PATH ...'; \ $env:PATH = 'C:\julia\bin;' + $env:PATH; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ @@ -32,9 +41,6 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 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.6/alpine3.14/Dockerfile b/1.6/alpine3.14/Dockerfile deleted file mode 100644 index 1c29ff2b..00000000 --- a/1.6/alpine3.14/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM alpine:3.14 - -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.6.4 - -RUN set -eux; \ - \ - apk add --no-cache --virtual .fetch-deps gnupg; \ - \ -# https://julialang.org/downloads/#julia-command-line-version -# https://julialang-s3.julialang.org/bin/checksums/julia-1.6.4.sha256 -# this "case" statement is generated via "update.sh" - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ -# amd64 - x86_64) tarArch='x86_64'; dirArch='x64'; sha256='63f121dffa982ff9b53c7c8a334830e17e2c9d2efa79316a548d29f7f8925e66' ;; \ - *) echo >&2 "error: current architecture ($apkArch) does not have a corresponding Julia binary release"; exit 1 ;; \ - esac; \ - \ - folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \ - wget -O julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz.asc"; \ - wget -O julia.tar.gz "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${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; \ - \ - apk del --no-network .fetch-deps; \ - \ -# smoke test - julia --version - -CMD ["julia"] diff --git a/1.6/alpine3.15/Dockerfile b/1.6/alpine3.15/Dockerfile deleted file mode 100644 index 5790c79d..00000000 --- a/1.6/alpine3.15/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM alpine:3.15 - -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.6.4 - -RUN set -eux; \ - \ - apk add --no-cache --virtual .fetch-deps gnupg; \ - \ -# https://julialang.org/downloads/#julia-command-line-version -# https://julialang-s3.julialang.org/bin/checksums/julia-1.6.4.sha256 -# this "case" statement is generated via "update.sh" - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ -# amd64 - x86_64) tarArch='x86_64'; dirArch='x64'; sha256='63f121dffa982ff9b53c7c8a334830e17e2c9d2efa79316a548d29f7f8925e66' ;; \ - *) echo >&2 "error: current architecture ($apkArch) does not have a corresponding Julia binary release"; exit 1 ;; \ - esac; \ - \ - folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \ - wget -O julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz.asc"; \ - wget -O julia.tar.gz "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${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; \ - \ - apk del --no-network .fetch-deps; \ - \ -# smoke test - julia --version - -CMD ["julia"] diff --git a/1.6/bullseye/Dockerfile b/1.6/bullseye/Dockerfile deleted file mode 100644 index 3a5d1751..00000000 --- a/1.6/bullseye/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -FROM debian:bullseye-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.6.4 - -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.6.4.sha256 -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ -# amd64 - amd64) tarArch='x86_64'; dirArch='x64'; sha256='52244ae47697e8073dfbc9d1251b0422f0dbd1fbe1a41da4b9f7ddf0506b2132' ;; \ -# arm32v7 - armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='9ad3f6bd71eb6840d4cef1569855da20c0b4931a2bdf77703a64df672b0702a1' ;; \ -# arm64v8 - arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='072daac7229c15fa41d0c1b65b8a3d6ee747323d02f5943da3846b075291b48b' ;; \ -# i386 - i386) tarArch='i686'; dirArch='x86'; sha256='9d43d642174cf22cf0fde18dc2578c84f357d2c619b9d846d3a6da4192ba48cf' ;; \ - *) 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.6/buster/Dockerfile b/1.6/buster/Dockerfile deleted file mode 100644 index 8efb8aa2..00000000 --- a/1.6/buster/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -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.6.4 - -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.6.4.sha256 -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ -# amd64 - amd64) tarArch='x86_64'; dirArch='x64'; sha256='52244ae47697e8073dfbc9d1251b0422f0dbd1fbe1a41da4b9f7ddf0506b2132' ;; \ -# arm32v7 - armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='9ad3f6bd71eb6840d4cef1569855da20c0b4931a2bdf77703a64df672b0702a1' ;; \ -# arm64v8 - arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='072daac7229c15fa41d0c1b65b8a3d6ee747323d02f5943da3846b075291b48b' ;; \ -# i386 - i386) tarArch='i686'; dirArch='x86'; sha256='9d43d642174cf22cf0fde18dc2578c84f357d2c619b9d846d3a6da4192ba48cf' ;; \ - *) 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/alpine3.14/Dockerfile b/1.7-rc/alpine3.14/Dockerfile deleted file mode 100644 index d411da7a..00000000 --- a/1.7-rc/alpine3.14/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM alpine:3.14 - -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-rc3 - -RUN set -eux; \ - \ - apk add --no-cache --virtual .fetch-deps gnupg; \ - \ -# https://julialang.org/downloads/#julia-command-line-version -# https://julialang-s3.julialang.org/bin/checksums/julia-1.7.0-rc3.sha256 -# this "case" statement is generated via "update.sh" - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ -# amd64 - x86_64) tarArch='x86_64'; dirArch='x64'; sha256='68dc3d7b17fbcceea383b48d82c63c36b899e05f5cd7537a730d7578f65c40ea' ;; \ - *) echo >&2 "error: current architecture ($apkArch) does not have a corresponding Julia binary release"; exit 1 ;; \ - esac; \ - \ - folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \ - wget -O julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz.asc"; \ - wget -O julia.tar.gz "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${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; \ - \ - apk del --no-network .fetch-deps; \ - \ -# smoke test - julia --version - -CMD ["julia"] diff --git a/1.7-rc/alpine3.15/Dockerfile b/1.7-rc/alpine3.15/Dockerfile deleted file mode 100644 index cce200f0..00000000 --- a/1.7-rc/alpine3.15/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM alpine:3.15 - -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-rc3 - -RUN set -eux; \ - \ - apk add --no-cache --virtual .fetch-deps gnupg; \ - \ -# https://julialang.org/downloads/#julia-command-line-version -# https://julialang-s3.julialang.org/bin/checksums/julia-1.7.0-rc3.sha256 -# this "case" statement is generated via "update.sh" - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ -# amd64 - x86_64) tarArch='x86_64'; dirArch='x64'; sha256='68dc3d7b17fbcceea383b48d82c63c36b899e05f5cd7537a730d7578f65c40ea' ;; \ - *) echo >&2 "error: current architecture ($apkArch) does not have a corresponding Julia binary release"; exit 1 ;; \ - esac; \ - \ - folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \ - wget -O julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz.asc"; \ - wget -O julia.tar.gz "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${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; \ - \ - apk del --no-network .fetch-deps; \ - \ -# smoke test - julia --version - -CMD ["julia"] diff --git a/1.7-rc/bullseye/Dockerfile b/1.7-rc/bullseye/Dockerfile deleted file mode 100644 index be519aba..00000000 --- a/1.7-rc/bullseye/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -FROM debian:bullseye-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-rc3 - -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-rc3.sha256 -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ -# amd64 - amd64) tarArch='x86_64'; dirArch='x64'; sha256='cbf33c533d6f226161f08cdc3cec16745a3dc5afdfbaece95e3f2a5e0b6b7886' ;; \ -# arm32v7 - armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='fff9370f58fd8f94f12a14d38c32d25b9e493d62a6d992edfc378caf9ef8d1cc' ;; \ -# arm64v8 - arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='0662f9f31c87559ec33a24b3b83df85071357708287678ca78c7fa4498d05e5c' ;; \ -# i386 - i386) tarArch='i686'; dirArch='x86'; sha256='9ee7692faee05d7dbe431c59850542d95d260368bbf6d4f0ccdd03be07fef817' ;; \ - *) 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/buster/Dockerfile b/1.7-rc/buster/Dockerfile deleted file mode 100644 index a8e58deb..00000000 --- a/1.7-rc/buster/Dockerfile +++ /dev/null @@ -1,73 +0,0 @@ -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-rc3 - -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-rc3.sha256 -# this "case" statement is generated via "update.sh" - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ -# amd64 - amd64) tarArch='x86_64'; dirArch='x64'; sha256='cbf33c533d6f226161f08cdc3cec16745a3dc5afdfbaece95e3f2a5e0b6b7886' ;; \ -# arm32v7 - armhf) tarArch='armv7l'; dirArch='armv7l'; sha256='fff9370f58fd8f94f12a14d38c32d25b9e493d62a6d992edfc378caf9ef8d1cc' ;; \ -# arm64v8 - arm64) tarArch='aarch64'; dirArch='aarch64'; sha256='0662f9f31c87559ec33a24b3b83df85071357708287678ca78c7fa4498d05e5c' ;; \ -# i386 - i386) tarArch='i686'; dirArch='x86'; sha256='9ee7692faee05d7dbe431c59850542d95d260368bbf6d4f0ccdd03be07fef817' ;; \ - *) 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-ltsc2016/Dockerfile b/1.7-rc/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index 0a32c8d7..00000000 --- a/1.7-rc/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -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-rc3 -ENV JULIA_SHA256 d48563b3faeeb0d937177f989f5c8bfe79552ac11255000870ce770a97c69de8 - -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/Dockerfile-alpine.template b/Dockerfile-alpine.template deleted file mode 100644 index f102cc42..00000000 --- a/Dockerfile-alpine.template +++ /dev/null @@ -1,43 +0,0 @@ -FROM alpine:%%TAG%% - -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 %%JULIA_VERSION%% - -RUN set -eux; \ - \ - apk add --no-cache --virtual .fetch-deps gnupg; \ - \ -# https://julialang.org/downloads/#julia-command-line-version -# https://julialang-s3.julialang.org/bin/checksums/julia-%%JULIA_VERSION%%.sha256 -# this "case" statement is generated via "update.sh" - %%ARCH-CASE%%; \ - \ - folder="$(echo "$JULIA_VERSION" | cut -d. -f1-2)"; \ - wget -O julia.tar.gz.asc "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${tarArch}.tar.gz.asc"; \ - wget -O julia.tar.gz "https://julialang-s3.julialang.org/bin/musl/${dirArch}/${folder}/julia-${JULIA_VERSION}-musl-${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; \ - \ - apk del --no-network .fetch-deps; \ - \ -# smoke test - julia --version - -CMD ["julia"] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template deleted file mode 100644 index 0a691755..00000000 --- a/Dockerfile-debian.template +++ /dev/null @@ -1,62 +0,0 @@ -FROM debian:%%TAG%% - -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 %%JULIA_VERSION%% - -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-%%JULIA_VERSION%%.sha256 -# this "case" statement is generated via "update.sh" - %%ARCH-CASE%%; \ - \ - 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/Dockerfile-linux.template b/Dockerfile-linux.template new file mode 100644 index 00000000..64c3874e --- /dev/null +++ b/Dockerfile-linux.template @@ -0,0 +1,130 @@ +{{ + include "shared" + ; + def is_alpine: + env.variant | startswith("alpine") + ; + def os_arches: + if is_alpine then + { + amd64: "x86_64", + arm32v6: "armhf", + arm32v7: "armv7", + arm64v8: "aarch64", + i386: "x86", + ppc64le: "ppc64le", + riscv64: "riscv64", + s390x: "s390x", + } + else + { + amd64: "amd64", + arm32v5: "armel", + arm32v7: "armhf", + arm64v8: "arm64", + i386: "i386", + mips64le: "mips64el", + ppc64le: "ppc64el", + riscv64: "riscv64", + s390x: "s390x", + } + end +-}} +FROM {{ from(env.variant) }} + +{{ if is_alpine then "" else ( -}} +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/* + +{{ ) end -}} +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 {{ .version }} + +RUN set -eux; \ + \ +{{ if is_alpine then ( -}} + apk add --no-cache --virtual .fetch-deps gnupg; \ +{{ ) else ( -}} + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ +{{ ) end -}} + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-{{ .version }}.sha256 +{{ if is_alpine then ( -}} + arch="$(apk --print-arch)"; \ +{{ ) else ( -}} + arch="$(dpkg --print-architecture)"; \ +{{ ) end -}} + case "$arch" in \ +{{ + [ + .arches + | to_entries[] + | select(.key | if is_alpine then startswith("alpine-") else contains("-") | not end) + | (.key | ltrimstr("alpine-")) as $bashbrewArch + | (os_arches[$bashbrewArch] // empty) as $osArch + | .value + | ( +-}} + {{ $osArch | @sh }}) \ + url={{ .url | @sh }}; \ + sha256={{ .sha256 | @sh }}; \ + ;; \ +{{ + ) + ] | add +-}} + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ +{{ def wget: if is_alpine then "wget -O" else "curl -fL -o" end -}} + {{ wget }} julia.tar.gz.asc "$url.asc"; \ + {{ wget }} julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum {{ if is_alpine then "-w -c" else "--strict --check" end }} -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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; \ + \ +{{ if is_alpine then ( -}} + apk del --no-network .fetch-deps; \ +{{ ) else ( -}} + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ +{{ ) end -}} + \ +# smoke test + julia --version + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/Dockerfile-windowsservercore.template b/Dockerfile-windows.template similarity index 72% rename from Dockerfile-windowsservercore.template rename to Dockerfile-windows.template index 1ed8fd4c..9044e150 100644 --- a/Dockerfile-windowsservercore.template +++ b/Dockerfile-windows.template @@ -1,15 +1,16 @@ -FROM mcr.microsoft.com/windows/servercore:%%TAG%% +{{ include "shared" -}} +FROM {{ from(env.variant) }} # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV JULIA_VERSION %%JULIA_VERSION%% -ENV JULIA_SHA256 %%JULIA_WINDOWS_SHA256%% +ENV JULIA_VERSION {{ .version }} +ENV JULIA_URL {{ .arches["windows-amd64"].url }} +ENV JULIA_SHA256 {{ .arches["windows-amd64"].sha256 }} -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); \ +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + Invoke-WebRequest -Uri $env:JULIA_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) { \ @@ -25,6 +26,9 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 '/DIR=C:\julia' \ ); \ \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ Write-Host 'Updating PATH ...'; \ $env:PATH = 'C:\julia\bin;' + $env:PATH; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ @@ -32,9 +36,6 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 Write-Host 'Verifying install ("julia --version") ...'; \ julia --version; \ \ - Write-Host 'Removing ...'; \ - Remove-Item julia.exe -Force; \ - \ Write-Host 'Complete.' CMD ["julia"] diff --git a/README.md b/README.md index f749a4e8..f8442835 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,4 @@ For more information about the full official images change lifecycle, see [the " For outstanding `julia` image PRs, check [PRs with the "library/julia" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2Fjulia). For the current "source of truth" for [`julia`](https://hub.docker.com/_/julia/), see [the `library/julia` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/julia). ---- - -- [![build status badge](https://img.shields.io/github/workflow/status/docker-library/julia/GitHub%20CI/master?label=GitHub%20CI)](https://github.com/docker-library/julia/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster) -- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/julia.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/julia/) - -| Build | Status | Badges | (per-arch) | -|:-:|:-:|:-:|:-:| -| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/julia.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/julia/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/julia.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/julia/) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/julia.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/julia/) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/julia.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/julia/) | -| [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/julia.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/julia/) | [![windows-amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/windows-amd64/job/julia.svg?label=windows-amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/windows-amd64/job/julia/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/julia.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/julia/) | - diff --git a/apply-templates.sh b/apply-templates.sh new file mode 100755 index 00000000..331d48ff --- /dev/null +++ b/apply-templates.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +[ -f versions.json ] # run "versions.sh" first + +jqt='.jq-template.awk' +if [ -n "${BASHBREW_SCRIPTS:-}" ]; then + jqt="$BASHBREW_SCRIPTS/jq-template.awk" +elif [ "$BASH_SOURCE" -nt "$jqt" ]; then + # https://github.com/docker-library/bashbrew/blob/master/scripts/jq-template.awk + wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/9f6a35772ac863a0241f147c820354e4008edf38/scripts/jq-template.awk' +fi + +if [ "$#" -eq 0 ]; then + versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)" + eval "set -- $versions" +fi + +generated_warning() { + cat <<-EOH + # + # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" + # + # PLEASE DO NOT EDIT IT DIRECTLY. + # + + EOH +} + +for version; do + export version + + rm -rf "$version/" + + if jq -e '.[env.version] | not' versions.json > /dev/null; then + echo "deleting $version ..." + continue + fi + + variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)" + eval "variants=( $variants )" + + for variant in "${variants[@]}"; do + export variant + + mkdir -p "$version/$variant" + + case "$variant" in + windows/*) + template='Dockerfile-windows.template' + ;; + + *) + template='Dockerfile-linux.template' + cp -a docker-entrypoint.sh "$version/$variant/" + ;; + esac + + echo "processing $version/$variant ..." + + { + generated_warning + gawk -f "$jqt" "$template" + } > "$version/$variant/Dockerfile" + done +done diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/generate-stackbrew-library.jq b/generate-stackbrew-library.jq new file mode 100644 index 00000000..45dd7589 --- /dev/null +++ b/generate-stackbrew-library.jq @@ -0,0 +1,141 @@ +include "shared"; + +to_entries +| map_values(select(.)) # ignore nulls ("rc" post-GA) + +| ( + # our entries are in precedence order, so loop over them in order and assign "generic" tags like "1" to the first entry that might use them + reduce .[] as $v ({}; + .[ + $v.value.version + | if $v.key == "rc" then + # pre-releases get an intentionally limited set of tags + [ + ., # "1.13.0-alpha2" + (split(".")[0:2] | join(".") + "-rc"), # "1.13-rc" + "rc", + empty + ] + else + # TODO should we add an explicit "stable" alias? for us, that's currently spelled "latest" and that's probably good enough? + # (see similar TODO in "versions.sh" about "lts") + split(".") + | [ + foreach .[] as $c ([]; . += [ $c ]) + | join(".") + ] + | reverse + [ "" ] + end + | .[] + ] //= $v.key + ) + # now that object is backwards ({ "1": "stable", "1.X": "stable" }), so let's reduce it back the other way ({ "stable": [ "1", "1.X" ] }) so lookups are trivial below + | reduce to_entries[] as $e ({}; .[$e.value] += [ $e.key ]) +) as $versionsTags + +| (first(.[].value.variants[] | select(startswith("alpine") or startswith("windows/") | not)) // "") as $latestDebian +| (first(.[].value.variants[] | select(startswith("alpine"))) // "") as $latestAlpine + +| .[] +| .key as $key +| .value + +# only the major versions asked for "./generate-stackbrew-library.sh X Y ..." +| if $ARGS.positional != [] then + select(IN($key; $ARGS.positional[])) +else . end + +| $versionsTags[$key] as $versionTags + +| .variants[] as $variant # "trixie", "alpine3.22", "windows/servercore-ltsc2025", etc + +# Tags: +| [ + ( + $variant + | if startswith("windows/servercore-") then + sub("/"; "") + elif startswith("windows/nanoserver-") then + ltrimstr("windows/") + else + . + end + ), + + if $variant == $latestAlpine then + "alpine" + else empty end, + + empty + + | $versionTags[] as $versionTag + | [ $versionTag, . | select(. != "") ] + | join("-") + | if . == "" then "latest" else . end +] as $tags + +# SharedTags: +| [ + ( + $variant + | if startswith("windows/servercore-") then + "windowsservercore", + "" + elif startswith("windows/nanoserver-") then + "nanoserver" + elif . == $latestDebian then + "" + else empty end + ), + + empty + + | $versionTags[] as $versionTag + | [ $versionTag, . | select(. != "") ] + | join("-") + | if . == "" then "latest" else . end +] as $sharedTags + +# Architectures: +| ( + .arches + | keys_unsorted + + | if $variant | startswith("alpine") then + map( + select(startswith("alpine-")) + | ltrimstr("alpine-") + ) + else . end + + | ( + $parentsArches[from($variant)] + // if $variant | startswith("windows/") then + [ "windows-amd64" ] # TODO windows-arm64v8 someday? + else [] end + ) as $parentArches + | . - (. - $parentArches) # intersection +) as $arches + +| ( + "", + "Tags: \($tags | join(", "))", + if $sharedTags != [] then "SharedTags: \($sharedTags | join(", "))" else empty end, + "Directory: \($key)/\($variant)", + "Architectures: \($arches | join(", "))", + ( + $variant + | if startswith("windows/") then + split("-")[-1] as $winver + | [ + if startswith("windows/nanoserver-") then + "nanoserver-" + $winver + else empty end, + "windowsservercore-" + $winver, + empty + ] + | "Constraints: " + join(", ") + else empty end + ), + empty +) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index d9039a3d..fba17b74 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,144 +1,46 @@ #!/usr/bin/env bash set -Eeuo pipefail -declare -A aliases=( - [1.6]='1 latest' -) -defaultDebianVariant='bullseye' -defaultAlpineVariant='alpine3.15' - self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" -versions=( */ ) -versions=( "${versions[@]%/}" ) - -# sort version numbers with highest first -IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -rV) ); unset IFS - -# get the most recent commit which modified any of "$@" -fileCommit() { - git log -1 --format='format:%H' HEAD -- "$@" -} - -# get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile" -dirCommit() { - local dir="$1"; shift - ( - cd "$dir" - fileCommit \ - Dockerfile \ - $(git show HEAD:./Dockerfile | awk ' - toupper($1) == "COPY" { - for (i = 2; i < NF; i++) { - print $i - } - } - ') - ) -} +# get the most recent commit which modified any files related to a build context +commit="$(git log -1 --format='format:%H' HEAD -- '[^.]*/**')" getArches() { local repo="$1"; shift - local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/' - - eval "declare -g -A parentRepoToArches=( $( - find -name 'Dockerfile' -exec awk ' - toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { - print "'"$officialImagesUrl"'" $2 - } - ' '{}' + \ - | sort -u \ - | xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"' - ) )" -} -getArches 'julia' - -source '.architectures-lib' - -parentArches() { - local version="$1"; shift # "1.8", etc - local dir="$1"; shift # "1.8/windows/windowsservercore-ltsc2016" - - local parent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")" - local parentArches="${parentRepoToArches[$parent]:-}" - - local arches=() - for arch in $parentArches; do - if hasBashbrewArch "$version" "$arch" && grep -qE "^# $arch\$" "$dir/Dockerfile"; then - arches+=( "$arch" ) - fi - done - echo "${arches[*]}" + local oiBase="${BASHBREW_LIBRARY:-https://github.com/docker-library/official-images/raw/HEAD/library}/" + + # grab supported architectures for each parent image, except self-referential + jq --raw-output \ + --arg oiBase "$oiBase" \ + --arg repo "$repo" ' + include "shared"; + [ + from(.[].variants[]) + | select(startswith($repo + ":") or index("/") | not) + ] + | unique[] + | $oiBase + . + ' versions.json \ + | xargs -r bashbrew cat --format '{ {{ join ":" .RepoName .TagName | json }}: {{ json .TagEntry.Architectures }} }' \ + | jq --compact-output --slurp 'add' } +parentsArches="$(getArches 'julia')" +selfCommit="$(git log -1 --format='format:%H' HEAD -- "$self")" cat <<-EOH -# this file is generated via https://github.com/docker-library/julia/blob/$(fileCommit "$self")/$self +# this file is generated via https://github.com/docker-library/julia/blob/$selfCommit/$self Maintainers: Tianon Gravi (@tianon), Joseph Ferguson (@yosifkit) GitRepo: https://github.com/docker-library/julia.git +GitCommit: $commit EOH -# prints "$2$1$3$1...$N" -join() { - local sep="$1"; shift - local out; printf -v out "${sep//%/%%}%s" "$@" - echo "${out#$sep}" -} - -for version in "${versions[@]}"; do - for v in \ - {bullseye,buster} \ - alpine{3.15,3.14} \ - windows/windowsservercore-{ltsc2022,1809,ltsc2016} \ - ; do - dir="$version/$v" - dir="${dir#./}" - variant="$(basename "$v")" - - [ -f "$dir/Dockerfile" ] || continue - - commit="$(dirCommit "$dir")" - - fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "JULIA_VERSION" { print $3; exit }')" - - versionAliases=() - while [ "$fullVersion" != "$version" -a "${fullVersion%[.-]*}" != "$fullVersion" ]; do - versionAliases+=( $fullVersion ) - fullVersion="${fullVersion%[.-]*}" - done - versionAliases+=( - $version - ${aliases[$version]:-} - ) - - variantAliases=( "${versionAliases[@]/%/-$variant}" ) - if [ "$variant" = "$defaultAlpineVariant" ]; then - variantAliases+=( "${versionAliases[@]/%/-alpine}" ) - fi - variantAliases=( "${variantAliases[@]//latest-/}" ) - - sharedTags=() - if [ "$variant" = "$defaultDebianVariant" ] || [[ "$variant" == 'windowsservercore'* ]]; then - sharedTags+=( "${versionAliases[@]}" ) - fi - - case "$v" in - windows/*) variantArches='windows-amd64' ;; - *) variantArches="$(parentArches "$version" "$dir")" ;; - esac - - echo - echo "Tags: $(join ', ' "${variantAliases[@]}")" - if [ "${#sharedTags[@]}" -gt 0 ]; then - echo "SharedTags: $(join ', ' "${sharedTags[@]}")" - fi - cat <<-EOE - Architectures: $(join ', ' $variantArches) - GitCommit: $commit - Directory: $dir - EOE - [[ "$v" == windows/* ]] && echo "Constraints: $variant" - done -done +exec jq \ + --raw-output \ + --argjson parentsArches "$parentsArches" \ + --from-file generate-stackbrew-library.jq \ + versions.json \ + --args -- "$@" diff --git a/rc/bookworm/Dockerfile b/rc/bookworm/Dockerfile new file mode 100644 index 00000000..c759cc70 --- /dev/null +++ b/rc/bookworm/Dockerfile @@ -0,0 +1,83 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:bookworm-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.13.0-beta2 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.13.0-beta2.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.13/julia-1.13.0-beta2-linux-x86_64.tar.gz'; \ + sha256='a12587225ccacf8988a3473535e73c7007223c5e3dba82ddce4efee2bf22db9a'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.13/julia-1.13.0-beta2-linux-i686.tar.gz'; \ + sha256='ec17bf167ea51e7ffd7604e03c5c7fb8eb235e2cdf78f45a25cce8151cfd784c'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.13/julia-1.13.0-beta2-linux-aarch64.tar.gz'; \ + sha256='2b0f8e396a0add65525daa038daadec3ee9f82b9ba02f09a4a59d6979202b932'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/rc/bookworm/docker-entrypoint.sh b/rc/bookworm/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/rc/bookworm/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/rc/trixie/Dockerfile b/rc/trixie/Dockerfile new file mode 100644 index 00000000..8638613e --- /dev/null +++ b/rc/trixie/Dockerfile @@ -0,0 +1,83 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:trixie-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.13.0-beta2 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.13.0-beta2.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.13/julia-1.13.0-beta2-linux-x86_64.tar.gz'; \ + sha256='a12587225ccacf8988a3473535e73c7007223c5e3dba82ddce4efee2bf22db9a'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.13/julia-1.13.0-beta2-linux-i686.tar.gz'; \ + sha256='ec17bf167ea51e7ffd7604e03c5c7fb8eb235e2cdf78f45a25cce8151cfd784c'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.13/julia-1.13.0-beta2-linux-aarch64.tar.gz'; \ + sha256='2b0f8e396a0add65525daa038daadec3ee9f82b9ba02f09a4a59d6979202b932'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/rc/trixie/docker-entrypoint.sh b/rc/trixie/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/rc/trixie/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/rc/windows/servercore-ltsc2022/Dockerfile b/rc/windows/servercore-ltsc2022/Dockerfile new file mode 100644 index 00000000..91351f2a --- /dev/null +++ b/rc/windows/servercore-ltsc2022/Dockerfile @@ -0,0 +1,46 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2022 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JULIA_VERSION 1.13.0-beta2 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.13/julia-1.13.0-beta2-win64.exe +ENV JULIA_SHA256 bcba1c45109550ad6da10076aa32c7c40d83af41a751341b22bb0f3046111a11 + +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $env:JULIA_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 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ + 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 'Complete.' + +CMD ["julia"] diff --git a/rc/windows/servercore-ltsc2025/Dockerfile b/rc/windows/servercore-ltsc2025/Dockerfile new file mode 100644 index 00000000..8b61425e --- /dev/null +++ b/rc/windows/servercore-ltsc2025/Dockerfile @@ -0,0 +1,46 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JULIA_VERSION 1.13.0-beta2 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.13/julia-1.13.0-beta2-win64.exe +ENV JULIA_SHA256 bcba1c45109550ad6da10076aa32c7c40d83af41a751341b22bb0f3046111a11 + +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $env:JULIA_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 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ + 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 'Complete.' + +CMD ["julia"] diff --git a/release-architectures b/release-architectures deleted file mode 100644 index 87752078..00000000 --- a/release-architectures +++ /dev/null @@ -1,8 +0,0 @@ -# see https://julialang.org/downloads/#julia-command-line-version - -# bashbrew-arch dpkg-arch julia-tar-arch julia-dir-arch -amd64 amd64 x86_64 x64 -arm32v7 armhf armv7l armv7l -arm64v8 arm64 aarch64 aarch64 -i386 i386 i686 x86 -ppc64le ppc64el ppc64le ppc64le diff --git a/shared.jq b/shared.jq new file mode 100644 index 00000000..f7643ff6 --- /dev/null +++ b/shared.jq @@ -0,0 +1,10 @@ +def from($variant): + $variant + | if startswith("alpine") then + "alpine:\(ltrimstr("alpine"))" + elif startswith("windows/") then + "mcr.microsoft.com/\(sub("-"; ":"))" # mcr.microsoft.com/windows/servercore:ltsc2025, ... + else + "debian:\(.)-slim" + end +; diff --git a/stable/bookworm/Dockerfile b/stable/bookworm/Dockerfile new file mode 100644 index 00000000..7435e4c0 --- /dev/null +++ b/stable/bookworm/Dockerfile @@ -0,0 +1,83 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:bookworm-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.12.5 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.12.5.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.12/julia-1.12.5-linux-x86_64.tar.gz'; \ + sha256='41b84d727e4e96fbf3ed9e92fa195d773d247b9097f73fad688f8b699758bae7'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.12/julia-1.12.5-linux-i686.tar.gz'; \ + sha256='aa664f0e5936c7ee2ac093675ea532d33dee60fbb330e62ce45a1a4c4800204a'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.12/julia-1.12.5-linux-aarch64.tar.gz'; \ + sha256='2e5de844ea4462bfb08a5ba9fa5ae03532183cc0d9e724590e2c8df654f3e8e2'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/stable/bookworm/docker-entrypoint.sh b/stable/bookworm/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/stable/bookworm/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/stable/trixie/Dockerfile b/stable/trixie/Dockerfile new file mode 100644 index 00000000..cb9bc10e --- /dev/null +++ b/stable/trixie/Dockerfile @@ -0,0 +1,83 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM debian:trixie-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.12.5 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gnupg \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ +# https://julialang.org/downloads/#julia-command-line-version +# https://julialang-s3.julialang.org/bin/checksums/julia-1.12.5.sha256 + arch="$(dpkg --print-architecture)"; \ + case "$arch" in \ + 'amd64') \ + url='https://julialang-s3.julialang.org/bin/linux/x64/1.12/julia-1.12.5-linux-x86_64.tar.gz'; \ + sha256='41b84d727e4e96fbf3ed9e92fa195d773d247b9097f73fad688f8b699758bae7'; \ + ;; \ + 'i386') \ + url='https://julialang-s3.julialang.org/bin/linux/x86/1.12/julia-1.12.5-linux-i686.tar.gz'; \ + sha256='aa664f0e5936c7ee2ac093675ea532d33dee60fbb330e62ce45a1a4c4800204a'; \ + ;; \ + 'arm64') \ + url='https://julialang-s3.julialang.org/bin/linux/aarch64/1.12/julia-1.12.5-linux-aarch64.tar.gz'; \ + sha256='2e5de844ea4462bfb08a5ba9fa5ae03532183cc0d9e724590e2c8df654f3e8e2'; \ + ;; \ + *) \ + echo >&2 "error: current architecture ($arch) does not have a corresponding Julia binary release"; \ + exit 1; \ + ;; \ + esac; \ + \ + curl -fL -o julia.tar.gz.asc "$url.asc"; \ + curl -fL -o julia.tar.gz "$url"; \ + \ + echo "$sha256 *julia.tar.gz" | sha256sum --strict --check -; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$JULIA_GPG"; \ + gpg --batch --verify julia.tar.gz.asc julia.tar.gz; \ + 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 + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] +CMD ["julia"] diff --git a/stable/trixie/docker-entrypoint.sh b/stable/trixie/docker-entrypoint.sh new file mode 100755 index 00000000..b3806f97 --- /dev/null +++ b/stable/trixie/docker-entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +# first arg is `-e` or `--some-option` (docker run julia -e '42') +# ... is a "*.jl" file (docker run -v ...:/my/file.jl:ro julia /my/file.jl) +# ... or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ] || [ "${1%.jl}" != "$1" ]; then + exec julia "$@" +fi + +exec "$@" diff --git a/1.6/windows/windowsservercore-ltsc2022/Dockerfile b/stable/windows/servercore-ltsc2022/Dockerfile similarity index 71% rename from 1.6/windows/windowsservercore-ltsc2022/Dockerfile rename to stable/windows/servercore-ltsc2022/Dockerfile index 3f9c483b..93bf53df 100644 --- a/1.6/windows/windowsservercore-ltsc2022/Dockerfile +++ b/stable/windows/servercore-ltsc2022/Dockerfile @@ -1,15 +1,21 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM mcr.microsoft.com/windows/servercore:ltsc2022 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV JULIA_VERSION 1.6.4 -ENV JULIA_SHA256 c9b6ecdad4feb57e5af12c9ef1a74993a96edbf87a4dc521d57e338397cee9b2 +ENV JULIA_VERSION 1.12.5 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.12/julia-1.12.5-win64.exe +ENV JULIA_SHA256 97c0cff9770baa823d40eb6f4f47fdfdcc3c48c609882354c01734f8abcd14f8 -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); \ +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + Invoke-WebRequest -Uri $env:JULIA_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) { \ @@ -25,6 +31,9 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 '/DIR=C:\julia' \ ); \ \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ Write-Host 'Updating PATH ...'; \ $env:PATH = 'C:\julia\bin;' + $env:PATH; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ @@ -32,9 +41,6 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 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.6/windows/windowsservercore-1809/Dockerfile b/stable/windows/servercore-ltsc2025/Dockerfile similarity index 68% rename from 1.6/windows/windowsservercore-1809/Dockerfile rename to stable/windows/servercore-ltsc2025/Dockerfile index e1a5c58d..f81f4912 100644 --- a/1.6/windows/windowsservercore-1809/Dockerfile +++ b/stable/windows/servercore-ltsc2025/Dockerfile @@ -1,15 +1,21 @@ -FROM mcr.microsoft.com/windows/servercore:1809 +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2025 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -ENV JULIA_VERSION 1.6.4 -ENV JULIA_SHA256 c9b6ecdad4feb57e5af12c9ef1a74993a96edbf87a4dc521d57e338397cee9b2 +ENV JULIA_VERSION 1.12.5 +ENV JULIA_URL https://julialang-s3.julialang.org/bin/winnt/x64/1.12/julia-1.12.5-win64.exe +ENV JULIA_SHA256 97c0cff9770baa823d40eb6f4f47fdfdcc3c48c609882354c01734f8abcd14f8 -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); \ +RUN Write-Host ('Downloading {0} ...' -f $env:JULIA_URL); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'julia.exe'; \ + Invoke-WebRequest -Uri $env:JULIA_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) { \ @@ -25,6 +31,9 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 '/DIR=C:\julia' \ ); \ \ + Write-Host 'Removing ...'; \ + Remove-Item julia.exe -Force; \ + \ Write-Host 'Updating PATH ...'; \ $env:PATH = 'C:\julia\bin;' + $env:PATH; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ @@ -32,9 +41,6 @@ RUN $url = ('https://julialang-s3.julialang.org/bin/winnt/x64/{1}/julia-{0}-win6 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 29d839d9..bac2d758 100755 --- a/update.sh +++ b/update.sh @@ -1,120 +1,7 @@ #!/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=( "$@" ) -if [ ${#versions[@]} -eq 0 ]; then - versions=( */ ) -fi -versions=( "${versions[@]%/}" ) - -source '.architectures-lib' - -# see https://stackoverflow.com/a/2705678/433558 -sed_escape_rhs() { - echo "$@" | sed -e 's/[\/&]/\\&/g' | sed -e ':a;N;$!ba;s/\n/\\n/g' -} - -rcRegex='-(pre[.])?(alpha|beta|rc)[0-9]*' - -pattern='[^"]*/julia-([0-9]+\.[0-9]+\.[0-9]+('"$rcRegex"')?)-linux-x86_64\.tar\.gz[^"]*' -allVersions="$( - curl -fsSL 'https://julialang.org/downloads/' \ - | grep -oE "$pattern" \ - | sed -rn "s!${pattern}!\1!gp" \ - | sort -ruV -)" - -for version in "${versions[@]}"; do - rcVersion="${version%-rc}" - rcGrepV='-v' - if [ "$rcVersion" != "$version" ]; then - rcGrepV= - fi - rcGrepV+=' -E' - - fullVersion="$(grep -E "^${rcVersion}([.-]|$)" <<<"$allVersions" | grep $rcGrepV -- "$rcRegex" | head -1)" - if [ -z "$fullVersion" ]; then - echo >&2 "error: failed to determine latest release for '$version'" - exit 1 - fi - - sha256s="$(curl -fsSL "https://julialang-s3.julialang.org/bin/checksums/julia-${fullVersion}.sha256")" - - linuxArchCase='dpkgArch="$(dpkg --print-architecture)"; '$'\\\n' - linuxArchCase+=$'\t''case "${dpkgArch##*-}" in '$'\\\n' - for dpkgArch in $(dpkgArches "$version"); do - tarArch="$(dpkgToJuliaTarArch "$version" "$dpkgArch")" - dirArch="$(dpkgToJuliaDirArch "$version" "$dpkgArch")" - sha256="$(grep "julia-${fullVersion}-linux-${tarArch}.tar.gz$" <<<"$sha256s" | cut -d' ' -f1 || :)" - if [ -z "$sha256" ]; then - echo >&2 "warning: cannot find sha256 for $fullVersion on arch $tarArch / $dirArch ($dpkgArch); skipping" - continue - fi - bashbrewArch="$(dpkgToBashbrewArch "$version" "$dpkgArch")" - linuxArchCase+="# $bashbrewArch"$'\n' - linuxArchCase+=$'\t\t'"$dpkgArch) tarArch='$tarArch'; dirArch='$dirArch'; sha256='$sha256' ;; "$'\\\n' - done - linuxArchCase+=$'\t\t''*) echo >&2 "error: current architecture ($dpkgArch) does not have a corresponding Julia binary release"; exit 1 ;; '$'\\\n' - linuxArchCase+=$'\t''esac' - - winSha256="$(grep "julia-${fullVersion}-win64.exe$" <<<"$sha256s" | cut -d' ' -f1)" - - echo "$version: $fullVersion" - - for v in \ - windows/windowsservercore-{ltsc2022,1809,ltsc2016} \ - alpine{3.15,3.14} \ - {bullseye,buster} \ - ; do - dir="$version/$v" - variant="$(basename "$v")" - - [ -d "$dir" ] || continue - - case "$variant" in - windowsservercore-*) template='windowsservercore'; tag="${variant#*-}" ;; - alpine*) template='alpine'; tag="${variant#alpine}" ;; - *) template='debian'; tag="${variant}-slim" ;; - esac - - variantArchCase="$linuxArchCase" - if [ "$template" = 'alpine' ]; then - sha256="$(grep "julia-${fullVersion}-musl-x86_64.tar.gz$" <<<"$sha256s" | cut -d' ' -f1 || :)" - if [ -z "$sha256" ]; then - echo >&2 "error: missing musl build for $fullVersion ($version)!" - exit 1 - fi - variantArchCase='apkArch="$(apk --print-arch)"; '$'\\\n' - variantArchCase+=$'\t''case "$apkArch" in '$'\\\n' - # TODO Alpine multiarch - variantArchCase+='# amd64'$'\n' - tarArch="$(dpkgToJuliaTarArch "$version" 'amd64')" - dirArch="$(dpkgToJuliaDirArch "$version" 'amd64')" - variantArchCase+=$'\t\t'"x86_64) tarArch='$tarArch'; dirArch='$dirArch'; sha256='$sha256' ;; "$'\\\n' - variantArchCase+=$'\t\t''*) echo >&2 "error: current architecture ($apkArch) does not have a corresponding Julia binary release"; exit 1 ;; '$'\\\n' - variantArchCase+=$'\t''esac' - fi - - sed -r \ - -e 's!%%JULIA_VERSION%%!'"$fullVersion"'!g' \ - -e 's!%%TAG%%!'"$tag"'!g' \ - -e 's!%%JULIA_WINDOWS_SHA256%%!'"$winSha256"'!g' \ - -e 's!%%ARCH-CASE%%!'"$(sed_escape_rhs "$variantArchCase")"'!g' \ - "Dockerfile-$template.template" > "$dir/Dockerfile" - - case "$dir" in - 1.0/windows/*) - # https://github.com/JuliaLang/julia/blob/v1.4.0-rc1/NEWS.md#build-system-changes - sed -ri \ - -e 's!/SILENT!/S!g' \ - -e 's!/DIR=!/D=!g' \ - "$dir/Dockerfile" - ;; - esac - done -done +./versions.sh "$@" +./apply-templates.sh "$@" diff --git a/versions.json b/versions.json new file mode 100644 index 00000000..2fee594e --- /dev/null +++ b/versions.json @@ -0,0 +1,188 @@ +{ + "stable": { + "version": "1.12.5", + "arches": { + "amd64": { + "url": "https://julialang-s3.julialang.org/bin/linux/x64/1.12/julia-1.12.5-linux-x86_64.tar.gz", + "sha256": "41b84d727e4e96fbf3ed9e92fa195d773d247b9097f73fad688f8b699758bae7" + }, + "i386": { + "url": "https://julialang-s3.julialang.org/bin/linux/x86/1.12/julia-1.12.5-linux-i686.tar.gz", + "sha256": "aa664f0e5936c7ee2ac093675ea532d33dee60fbb330e62ce45a1a4c4800204a" + }, + "arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/linux/aarch64/1.12/julia-1.12.5-linux-aarch64.tar.gz", + "sha256": "2e5de844ea4462bfb08a5ba9fa5ae03532183cc0d9e724590e2c8df654f3e8e2" + }, + "darwin-amd64": { + "url": "https://julialang-s3.julialang.org/bin/mac/x64/1.12/julia-1.12.5-mac64.tar.gz", + "sha256": "e4b707258ee32d46afdd2cc549552adcc74244f50307aa9fed09716efc6d15ad" + }, + "darwin-arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/mac/aarch64/1.12/julia-1.12.5-macaarch64.tar.gz", + "sha256": "1fc0e00e8bee5d29b351ebab30c795f18ab335dacc897f1624e70ea25188d405" + }, + "windows-amd64": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x64/1.12/julia-1.12.5-win64.exe", + "sha256": "97c0cff9770baa823d40eb6f4f47fdfdcc3c48c609882354c01734f8abcd14f8" + }, + "windows-i386": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x86/1.12/julia-1.12.5-win32.exe", + "sha256": "a168530ab53042750a393095538d71caed90290048431fefc0ec3a1fe4abd7c3" + }, + "freebsd-amd64": { + "url": "https://julialang-s3.julialang.org/bin/freebsd/x64/1.12/julia-1.12.5-freebsd-x86_64.tar.gz", + "sha256": "313714a8c38fc9e772226d273f2ef228bab2087318a7381a63408a013b54cec1" + } + }, + "variants": [ + "trixie", + "bookworm", + "windows/servercore-ltsc2025", + "windows/servercore-ltsc2022" + ] + }, + "1.10": { + "version": "1.10.10", + "arches": { + "amd64": { + "url": "https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.10-linux-x86_64.tar.gz", + "sha256": "6a78a03a71c7ab792e8673dc5cedb918e037f081ceb58b50971dfb7c64c5bf81" + }, + "i386": { + "url": "https://julialang-s3.julialang.org/bin/linux/x86/1.10/julia-1.10.10-linux-i686.tar.gz", + "sha256": "32186f38e7f6c7830375da1d1327bec3b187d93e3f0ff007829f20f578fd8c35" + }, + "arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/linux/aarch64/1.10/julia-1.10.10-linux-aarch64.tar.gz", + "sha256": "a4b157ed68da10471ea86acc05a0ab61c1a6931ee592a9b236be227d72da50ff" + }, + "ppc64le": { + "url": "https://julialang-s3.julialang.org/bin/linux/ppc64le/1.10/julia-1.10.10-linux-ppc64le.tar.gz", + "sha256": "f47516c511f100670cad72f3c7a1d95d2c20862f1aa14b1162b0b90424167f16" + }, + "alpine-amd64": { + "url": "https://julialang-s3.julialang.org/bin/musl/x64/1.10/julia-1.10.10-musl-x86_64.tar.gz", + "sha256": "2d109f3f96f2be8ea45a0676f506642c20d972aeb3d526e8fa10ed49c0d6c786" + }, + "darwin-amd64": { + "url": "https://julialang-s3.julialang.org/bin/mac/x64/1.10/julia-1.10.10-mac64.tar.gz", + "sha256": "942b0d4accc9704861c7781558829b1d521df21226ad97bd01e1e43b1518d3e6" + }, + "darwin-arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/mac/aarch64/1.10/julia-1.10.10-macaarch64.tar.gz", + "sha256": "52d3f82c50d9402e42298b52edc3d36e0f73e59f81fc8609d22fa094fbad18be" + }, + "windows-amd64": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x64/1.10/julia-1.10.10-win64.exe", + "sha256": "c2a9087064a193e8c2219cc03fac2264445bc9ccf626e30acc39ebd5fa7ad09f" + }, + "windows-i386": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x86/1.10/julia-1.10.10-win32.exe", + "sha256": "8e52c9ebcdf58a7ba54dad8280cda5b5775489f121bc7a73dc85083d5982d6f7" + }, + "freebsd-amd64": { + "url": "https://julialang-s3.julialang.org/bin/freebsd/x64/1.10/julia-1.10.10-freebsd-x86_64.tar.gz", + "sha256": "df2990b7461f6b3f753dd714cda3335d79168967f47a633baa9ebc583e10e6b4" + } + }, + "variants": [ + "trixie", + "bookworm", + "alpine3.23", + "alpine3.22", + "windows/servercore-ltsc2025", + "windows/servercore-ltsc2022" + ] + }, + "1.11": { + "version": "1.11.9", + "arches": { + "amd64": { + "url": "https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.9-linux-x86_64.tar.gz", + "sha256": "b36363356d7a05eaf8b7b9e7a91c710f6bd3d2940be4d4e6d14b9a9f2927de35" + }, + "i386": { + "url": "https://julialang-s3.julialang.org/bin/linux/x86/1.11/julia-1.11.9-linux-i686.tar.gz", + "sha256": "74df5031a93bce45e30582a71bf70f4ba983ff42f6eaf54eb9effb6e124604ca" + }, + "arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/linux/aarch64/1.11/julia-1.11.9-linux-aarch64.tar.gz", + "sha256": "a2071f0654d1d6af4381cba650b9f790f5f8bb7a570e51e378de8bcf67ff623e" + }, + "ppc64le": { + "url": "https://julialang-s3.julialang.org/bin/linux/ppc64le/1.11/julia-1.11.9-linux-ppc64le.tar.gz", + "sha256": "3c25d5bf70d65da5859d65b34d17646dd1b3f1b50ea2090d13e63171d6dbf861" + }, + "darwin-amd64": { + "url": "https://julialang-s3.julialang.org/bin/mac/x64/1.11/julia-1.11.9-mac64.tar.gz", + "sha256": "f7b49c3ddb22389dfab2c1d8d26fa4bef540ee8195650d8c502daa9c1c2edf92" + }, + "darwin-arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/mac/aarch64/1.11/julia-1.11.9-macaarch64.tar.gz", + "sha256": "ed903d0d337036fc3a68414bfca5f73107af162678ef76b52e42e84e25f33bd7" + }, + "windows-amd64": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x64/1.11/julia-1.11.9-win64.exe", + "sha256": "747ff8983fa183e0e35e618c9212815cba0b3ad29a44eaac039acc755a0d91b6" + }, + "windows-i386": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x86/1.11/julia-1.11.9-win32.exe", + "sha256": "cf083fe27e5dd9293175708625bb5d911250e29a6b7e8ecd95852228ffc6d66f" + }, + "freebsd-amd64": { + "url": "https://julialang-s3.julialang.org/bin/freebsd/x64/1.11/julia-1.11.9-freebsd-x86_64.tar.gz", + "sha256": "275c0bc46f50b58a584a30f29fda20b757b8f6a1dff4cf664b0168724ff3d373" + } + }, + "variants": [ + "trixie", + "bookworm", + "windows/servercore-ltsc2025", + "windows/servercore-ltsc2022" + ] + }, + "rc": { + "version": "1.13.0-beta2", + "arches": { + "amd64": { + "url": "https://julialang-s3.julialang.org/bin/linux/x64/1.13/julia-1.13.0-beta2-linux-x86_64.tar.gz", + "sha256": "a12587225ccacf8988a3473535e73c7007223c5e3dba82ddce4efee2bf22db9a" + }, + "i386": { + "url": "https://julialang-s3.julialang.org/bin/linux/x86/1.13/julia-1.13.0-beta2-linux-i686.tar.gz", + "sha256": "ec17bf167ea51e7ffd7604e03c5c7fb8eb235e2cdf78f45a25cce8151cfd784c" + }, + "arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/linux/aarch64/1.13/julia-1.13.0-beta2-linux-aarch64.tar.gz", + "sha256": "2b0f8e396a0add65525daa038daadec3ee9f82b9ba02f09a4a59d6979202b932" + }, + "darwin-amd64": { + "url": "https://julialang-s3.julialang.org/bin/mac/x64/1.13/julia-1.13.0-beta2-mac64.tar.gz", + "sha256": "856160965fe4707a1935ec0d8099e132035f3317b90353cead2568deaca33f9d" + }, + "darwin-arm64v8": { + "url": "https://julialang-s3.julialang.org/bin/mac/aarch64/1.13/julia-1.13.0-beta2-macaarch64.tar.gz", + "sha256": "bbd507882d374c0969b051c6fe71f1407e37b456b6d60fdf2c18ba3cec1b985c" + }, + "windows-amd64": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x64/1.13/julia-1.13.0-beta2-win64.exe", + "sha256": "bcba1c45109550ad6da10076aa32c7c40d83af41a751341b22bb0f3046111a11" + }, + "windows-i386": { + "url": "https://julialang-s3.julialang.org/bin/winnt/x86/1.13/julia-1.13.0-beta2-win32.exe", + "sha256": "587ed2cd206a009c46ab225ecf496ff822b83061730f26394c4a34f367470839" + }, + "freebsd-amd64": { + "url": "https://julialang-s3.julialang.org/bin/freebsd/x64/1.13/julia-1.13.0-beta2-freebsd-x86_64.tar.gz", + "sha256": "5d615852a23cf7800660f75efc9e45e94156325f8331c054f1fcfebd75e65743" + } + }, + "variants": [ + "trixie", + "bookworm", + "windows/servercore-ltsc2025", + "windows/servercore-ltsc2022" + ] + } +} diff --git a/versions.sh b/versions.sh new file mode 100755 index 00000000..8fa00122 --- /dev/null +++ b/versions.sh @@ -0,0 +1,146 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +versions=( "$@" ) +if [ ${#versions[@]} -eq 0 ]; then + versions=( */ ) + json='{}' +else + json="$(< versions.json)" +fi +versions=( "${versions[@]%/}" ) + +# TODO scrape LTS version track from somewhere so we can rename the "1.x" folder of LTS to just "lts" and have this script deal with it completely +# see also https://github.com/docker-library/julia/issues/92 + +# https://julialang.org/downloads/#json_release_feed +# https://julialang-s3.julialang.org/bin/versions.json +# https://julialang-s3.julialang.org/bin/versions-schema.json +juliaVersions="$( + wget -qO- 'https://julialang-s3.julialang.org/bin/versions.json' | jq -c ' + [ + to_entries[] + | .key as $version + | .value + | { + $version, + stable, + arches: (.files | map( + # map values from the julia versions-schema.json to bashbrew architecture values + # (plus some extra fiddly bits for Alpine) + { + mac: "darwin", + winnt: "windows", + linux: ( + if .triplet | endswith("-musl") then + "alpine" + else + "linux" + end + ), + freebsd: "freebsd", + }[.os] as $os + | { + x86_64: "amd64", + i686: "i386", + powerpc64le: "ppc64le", + aarch64: "arm64v8", + armv7l: "arm32v7", + }[.arch] as $arch + | if $os == null or $arch == null then empty + elif .kind != (if $os == "windows" then "installer" else "archive" end) then empty + else { + key: ( + if $os == "linux" then "" else $os + "-" end + + $arch + ), + value: { + url: .url, + sha256: .sha256, + }, + } end + ) | from_entries), + } + ] + + | ( + def scan_version: + [ + scan("[0-9]+|[^0-9]+|^$") + | tonumber? // . + ] + ; + + sort_by(.version | scan_version) + | reverse + + | first(.[] | select(.stable) | .version) as $stable + | first(.[] | select(.stable | not) | .version) as $rc + | if ($stable | scan_version) >= ($rc | scan_version) then + # if latest "stable" is newer than the latest pre-release, remove *all* the pre-releases + map(select(.stable)) + else . end + ) + ' +)" + +for version in "${versions[@]}"; do + export version + + if \ + ! doc="$(jq <<<"$juliaVersions" -ce ' + first(.[] | select( + if IN(env.version; "stable", "rc") then + .stable == (env.version == "stable") + else + .stable and ( + .version + | startswith(env.version + ".") + ) + end + )) + ')" \ + || ! fullVersion="$(jq <<<"$doc" -r '.version')" \ + || [ -z "$fullVersion" ] \ + ; then + echo >&2 "warning: cannot find full version for $version" + json="$(jq <<<"$json" -c '.[env.version] = null')" + continue + fi + + echo "$version: $fullVersion" + + json="$(jq <<<"$json" -c --argjson doc "$doc" '.[env.version] = ( + $doc + | del(.stable) + | .variants = ([ + "trixie", + "bookworm", + if .arches | keys | any(startswith("alpine-")) then + "3.23", + "3.22", + empty + | "alpine" + . + else empty end, + if .arches | has("windows-amd64") then # TODO "windows-arm64v8" someday? 👀 + "ltsc2025", + "ltsc2022", + empty + | "windows/servercore-" + . + else empty end + ]) + )')" +done + +jq <<<"$json" ' + to_entries + | sort_by( + .key as $k + # match the order on https://julialang.org/downloads/manual-downloads/ + | [ "stable", "lts" ] | (index($k) // length + ([ "rc" ] | (index($k) // -1) + 1)), $k + # (this is a compressed clone of https://github.com/docker-library/meta-scripts/blob/af716438af4178d318a03f4144668d76c9c8222f/sort.jq#L29-L52) + ) + | from_entries +' > versions.json