From 60d6e4fe76f5884968e589201667b5238a8f9012 Mon Sep 17 00:00:00 2001 From: J0WI Date: Tue, 30 Nov 2021 10:50:51 +0100 Subject: [PATCH] Bullseye and Alpine 3.15 --- 1.0/{stretch => bullseye}/Dockerfile | 2 +- 1.6/{alpine3.13 => alpine3.15}/Dockerfile | 2 +- 1.6/bullseye/Dockerfile | 73 +++++++++++++++++++++++ 1.7-rc/alpine3.15/Dockerfile | 48 +++++++++++++++ 1.7-rc/bullseye/Dockerfile | 73 +++++++++++++++++++++++ generate-stackbrew-library.sh | 8 +-- update.sh | 9 +-- 7 files changed, 202 insertions(+), 13 deletions(-) rename 1.0/{stretch => bullseye}/Dockerfile (99%) rename 1.6/{alpine3.13 => alpine3.15}/Dockerfile (99%) create mode 100644 1.6/bullseye/Dockerfile create mode 100644 1.7-rc/alpine3.15/Dockerfile create mode 100644 1.7-rc/bullseye/Dockerfile diff --git a/1.0/stretch/Dockerfile b/1.0/bullseye/Dockerfile similarity index 99% rename from 1.0/stretch/Dockerfile rename to 1.0/bullseye/Dockerfile index ada26740..2441a8fd 100644 --- a/1.0/stretch/Dockerfile +++ b/1.0/bullseye/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stretch +FROM debian:bullseye-slim RUN set -eux; \ apt-get update; \ diff --git a/1.6/alpine3.13/Dockerfile b/1.6/alpine3.15/Dockerfile similarity index 99% rename from 1.6/alpine3.13/Dockerfile rename to 1.6/alpine3.15/Dockerfile index aa7dbd13..5790c79d 100644 --- a/1.6/alpine3.13/Dockerfile +++ b/1.6/alpine3.15/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.13 +FROM alpine:3.15 ENV JULIA_PATH /usr/local/julia ENV PATH $JULIA_PATH/bin:$PATH diff --git a/1.6/bullseye/Dockerfile b/1.6/bullseye/Dockerfile new file mode 100644 index 00000000..3a5d1751 --- /dev/null +++ b/1.6/bullseye/Dockerfile @@ -0,0 +1,73 @@ +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.7-rc/alpine3.15/Dockerfile b/1.7-rc/alpine3.15/Dockerfile new file mode 100644 index 00000000..cce200f0 --- /dev/null +++ b/1.7-rc/alpine3.15/Dockerfile @@ -0,0 +1,48 @@ +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 new file mode 100644 index 00000000..be519aba --- /dev/null +++ b/1.7-rc/bullseye/Dockerfile @@ -0,0 +1,73 @@ +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/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 6eb132ef..d9039a3d 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -4,8 +4,8 @@ set -Eeuo pipefail declare -A aliases=( [1.6]='1 latest' ) -defaultDebianVariant='buster' -defaultAlpineVariant='alpine3.14' +defaultDebianVariant='bullseye' +defaultAlpineVariant='alpine3.15' self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" @@ -89,8 +89,8 @@ join() { for version in "${versions[@]}"; do for v in \ - {buster,stretch} \ - alpine{3.14,3.13} \ + {bullseye,buster} \ + alpine{3.15,3.14} \ windows/windowsservercore-{ltsc2022,1809,ltsc2016} \ ; do dir="$version/$v" diff --git a/update.sh b/update.sh index 9b99ff72..29d839d9 100755 --- a/update.sh +++ b/update.sh @@ -68,8 +68,8 @@ for version in "${versions[@]}"; do for v in \ windows/windowsservercore-{ltsc2022,1809,ltsc2016} \ - alpine{3.14,3.13} \ - {stretch,buster} \ + alpine{3.15,3.14} \ + {bullseye,buster} \ ; do dir="$version/$v" variant="$(basename "$v")" @@ -82,11 +82,6 @@ for version in "${versions[@]}"; do *) template='debian'; tag="${variant}-slim" ;; esac - if [ "$version" = '1.0' ] && [ "$template" = 'debian' ] && [ "$variant" = 'stretch' ]; then - # 1.0-stretch needs to stay non-slim for backwards compatibility - tag="$variant" - fi - variantArchCase="$linuxArchCase" if [ "$template" = 'alpine' ]; then sha256="$(grep "julia-${fullVersion}-musl-x86_64.tar.gz$" <<<"$sha256s" | cut -d' ' -f1 || :)"