From 0974f03f9ebd6842b34a000c835bfec15020e0b7 Mon Sep 17 00:00:00 2001 From: Wes Morgan Date: Thu, 12 Oct 2023 15:35:19 -0600 Subject: [PATCH 1/3] Remove JDK 20 variants It's no longer supported upstream --- src/docker_clojure/config.clj | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/docker_clojure/config.clj b/src/docker_clojure/config.clj index a47de5c5..01de8b12 100644 --- a/src/docker_clojure/config.clj +++ b/src/docker_clojure/config.clj @@ -39,14 +39,13 @@ (def git-repo "https://github.com/Quantisan/docker-clojure.git") -(def jdk-versions #{8 11 17 20 21}) +(def jdk-versions #{8 11 17 21}) (def base-images "Map of JDK version to base image name(s) with :default as a fallback" {8 ["eclipse-temurin" "debian"] 11 ["eclipse-temurin" "debian"] 17 ["eclipse-temurin" "debian"] - 20 ["eclipse-temurin" "debian"] :default ["debian" "eclipse-temurin"]}) ;; The default JDK version to use for tags that don't specify one; usually the latest LTS release @@ -73,7 +72,6 @@ {8 :ubuntu/jammy 11 :ubuntu/jammy 17 :ubuntu/jammy - 20 :ubuntu/jammy :default :debian/bookworm}) (def build-tools @@ -98,16 +96,12 @@ ; no more focal builds for JDK 20+ ; TODO: Add ability to specify version >= 20 for these - {:jdk-version 20 - :distro :ubuntu/focal} {:jdk-version 21 :distro :ubuntu/focal} {:build-tool "boot" :distro :alpine/alpine} ; boot is breaking on Alpine ; we're no longer building boot variants for JDK 20+ ; TODO: Add ability to specify version >= 20 for these - {:jdk-version 20 - :build-tool "boot"} {:jdk-version 21 :build-tool "boot"} ;; commented out example From 134077b419c12e86525862e2454386cf5152a4f6 Mon Sep 17 00:00:00 2001 From: Wes Morgan Date: Thu, 12 Oct 2023 15:39:17 -0600 Subject: [PATCH 2/3] Update manifest tests for JDK 20 removal --- test/docker_clojure/manifest_test.clj | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/docker_clojure/manifest_test.clj b/test/docker_clojure/manifest_test.clj index 485b0f65..2dd032fd 100644 --- a/test/docker_clojure/manifest_test.clj +++ b/test/docker_clojure/manifest_test.clj @@ -12,15 +12,19 @@ (is ((set tags) "tools-deps")))) (testing "Generates jdk-version-build-tool tag for every jdk version" (are [jdk-version tag] - (let [tags (variant-tags {:base-image "eclipse-temurin" + (let [tags (variant-tags {:base-image (if (< jdk-version 21) + "eclipse-temurin" + "debian") :jdk-version jdk-version - :distro :ubuntu/jammy + :distro (if (< jdk-version 21) + :ubuntu/jammy + :debian/bookworm) :build-tool "tools-deps" :build-tool-version "1.11.1.1155"})] ((set tags) tag)) 11 "temurin-11-tools-deps" 17 "temurin-17-tools-deps" - 20 "temurin-20-tools-deps")) + 21 "temurin-21-tools-deps")) (testing "Generates build-tool-distro tag for every distro" (are [distro tag] (let [tags (variant-tags {:base-image "debian" From 07d5ad3bf3c11cd9cdeef58e7bd1affb386b207f Mon Sep 17 00:00:00 2001 From: Wes Morgan Date: Thu, 12 Oct 2023 15:39:42 -0600 Subject: [PATCH 3/3] Update Dockerfiles for JDK 20 removal --- target/debian-bookworm-20/lein/Dockerfile | 47 ------------------- target/debian-bookworm-20/lein/entrypoint | 21 --------- .../debian-bookworm-20/tools-deps/Dockerfile | 32 ------------- .../debian-bookworm-20/tools-deps/entrypoint | 21 --------- .../tools-deps/rlwrap.retry | 30 ------------ .../debian-bookworm-slim-20/lein/Dockerfile | 47 ------------------- .../debian-bookworm-slim-20/lein/entrypoint | 21 --------- .../tools-deps/Dockerfile | 32 ------------- .../tools-deps/entrypoint | 21 --------- .../tools-deps/rlwrap.retry | 30 ------------ target/debian-bullseye-20/lein/Dockerfile | 47 ------------------- target/debian-bullseye-20/lein/entrypoint | 21 --------- .../debian-bullseye-20/tools-deps/Dockerfile | 32 ------------- .../debian-bullseye-20/tools-deps/entrypoint | 21 --------- .../tools-deps/rlwrap.retry | 30 ------------ .../debian-bullseye-slim-20/lein/Dockerfile | 47 ------------------- .../debian-bullseye-slim-20/lein/entrypoint | 21 --------- .../tools-deps/Dockerfile | 32 ------------- .../tools-deps/entrypoint | 21 --------- .../tools-deps/rlwrap.retry | 30 ------------ .../lein/Dockerfile | 41 ---------------- .../lein/entrypoint | 21 --------- .../tools-deps/Dockerfile | 26 ---------- .../tools-deps/entrypoint | 21 --------- .../tools-deps/rlwrap.retry | 30 ------------ .../lein/Dockerfile | 43 ----------------- .../lein/entrypoint | 21 --------- .../tools-deps/Dockerfile | 28 ----------- .../tools-deps/entrypoint | 21 --------- .../tools-deps/rlwrap.retry | 30 ------------ 30 files changed, 886 deletions(-) delete mode 100644 target/debian-bookworm-20/lein/Dockerfile delete mode 100755 target/debian-bookworm-20/lein/entrypoint delete mode 100644 target/debian-bookworm-20/tools-deps/Dockerfile delete mode 100755 target/debian-bookworm-20/tools-deps/entrypoint delete mode 100755 target/debian-bookworm-20/tools-deps/rlwrap.retry delete mode 100644 target/debian-bookworm-slim-20/lein/Dockerfile delete mode 100755 target/debian-bookworm-slim-20/lein/entrypoint delete mode 100644 target/debian-bookworm-slim-20/tools-deps/Dockerfile delete mode 100755 target/debian-bookworm-slim-20/tools-deps/entrypoint delete mode 100755 target/debian-bookworm-slim-20/tools-deps/rlwrap.retry delete mode 100644 target/debian-bullseye-20/lein/Dockerfile delete mode 100755 target/debian-bullseye-20/lein/entrypoint delete mode 100644 target/debian-bullseye-20/tools-deps/Dockerfile delete mode 100755 target/debian-bullseye-20/tools-deps/entrypoint delete mode 100755 target/debian-bullseye-20/tools-deps/rlwrap.retry delete mode 100644 target/debian-bullseye-slim-20/lein/Dockerfile delete mode 100755 target/debian-bullseye-slim-20/lein/entrypoint delete mode 100644 target/debian-bullseye-slim-20/tools-deps/Dockerfile delete mode 100755 target/debian-bullseye-slim-20/tools-deps/entrypoint delete mode 100755 target/debian-bullseye-slim-20/tools-deps/rlwrap.retry delete mode 100644 target/eclipse-temurin-20-jdk-alpine/lein/Dockerfile delete mode 100755 target/eclipse-temurin-20-jdk-alpine/lein/entrypoint delete mode 100644 target/eclipse-temurin-20-jdk-alpine/tools-deps/Dockerfile delete mode 100755 target/eclipse-temurin-20-jdk-alpine/tools-deps/entrypoint delete mode 100755 target/eclipse-temurin-20-jdk-alpine/tools-deps/rlwrap.retry delete mode 100644 target/eclipse-temurin-20-jdk-jammy/lein/Dockerfile delete mode 100755 target/eclipse-temurin-20-jdk-jammy/lein/entrypoint delete mode 100644 target/eclipse-temurin-20-jdk-jammy/tools-deps/Dockerfile delete mode 100755 target/eclipse-temurin-20-jdk-jammy/tools-deps/entrypoint delete mode 100755 target/eclipse-temurin-20-jdk-jammy/tools-deps/rlwrap.retry diff --git a/target/debian-bookworm-20/lein/Dockerfile b/target/debian-bookworm-20/lein/Dockerfile deleted file mode 100644 index ba39052c..00000000 --- a/target/debian-bookworm-20/lein/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian:bookworm - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV LEIN_VERSION=2.10.0 -ENV LEIN_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# Download the whole repo as an archive -RUN set -eux; \ -apt-get update && \ -apt-get install -y make gnupg wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://codeberg.org/leiningen/leiningen/raw/tag/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "b1757ce941e4cbf15cbf649b7b4f413365e612da892d22841ec1728391bb66af *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -echo "Verifying file PGP signature..." && \ -gpg --batch --verify leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -gpgconf --kill all && \ -rm -rf "$GNUPGHOME" leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -mkdir -p /usr/share/java && \ -mv leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar && \ -apt-get purge -y --auto-remove gnupg wget - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.11.1 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.11.1"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/debian-bookworm-20/lein/entrypoint b/target/debian-bookworm-20/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/debian-bookworm-20/lein/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=lein - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bookworm-20/tools-deps/Dockerfile b/target/debian-bookworm-20/tools-deps/Dockerfile deleted file mode 100644 index faf76d5e..00000000 --- a/target/debian-bookworm-20/tools-deps/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:bookworm - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV CLOJURE_VERSION=1.11.1.1413 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y curl make git rlwrap wget && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "ad9aa1e99c59a4f7eb66450914fbec543337d9fada60dd9d34eec7fe18ae4965 *linux-install-$CLOJURE_VERSION.sh" | sha256sum -c - && \ -chmod +x linux-install-$CLOJURE_VERSION.sh && \ -./linux-install-$CLOJURE_VERSION.sh && \ -rm linux-install-$CLOJURE_VERSION.sh && \ -clojure -e "(clojure-version)" && \ -apt-get purge -y --auto-remove curl wget - -# Docker bug makes rlwrap crash w/o short sleep first -# Bug: https://github.com/moby/moby/issues/28009 -# As of 2021-09-10 this bug still exists, despite that issue being closed -COPY rlwrap.retry /usr/local/bin/rlwrap - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["-M", "--repl"] diff --git a/target/debian-bookworm-20/tools-deps/entrypoint b/target/debian-bookworm-20/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/debian-bookworm-20/tools-deps/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=clj - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bookworm-20/tools-deps/rlwrap.retry b/target/debian-bookworm-20/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/debian-bookworm-20/tools-deps/rlwrap.retry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# This script works around a Docker bug that prevents rlwrap from starting -# right when a container is first started. It is intended to replace -# /usr/bin/rlwrap and also be named rlwrap but earlier in the PATH -# (e.g. /usr/local/bin). - -max_tries=100 # 100 tries is ~1 second -try=0 - -while true; do - # see if rlwrap can start at all - output=$(/usr/bin/rlwrap true 2>&1 >/dev/null) - exit_code=$? - if [ $exit_code -gt 0 ]; then - # it didn't start - try=$((try+1)) - if [ $try -gt $max_tries ]; then - # we're at max attempts so output the error and exit w/ the same code - echo "$output" >&2 - exit $exit_code - else - # wait a bit and try again - sleep 0.01 - fi - else - # rlwrap can start so let's run it for real - exec /usr/bin/rlwrap "$@" - fi -done diff --git a/target/debian-bookworm-slim-20/lein/Dockerfile b/target/debian-bookworm-slim-20/lein/Dockerfile deleted file mode 100644 index d6a5893c..00000000 --- a/target/debian-bookworm-slim-20/lein/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian:bookworm-slim - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV LEIN_VERSION=2.10.0 -ENV LEIN_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# Download the whole repo as an archive -RUN set -eux; \ -apt-get update && \ -apt-get install -y gnupg wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://codeberg.org/leiningen/leiningen/raw/tag/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "b1757ce941e4cbf15cbf649b7b4f413365e612da892d22841ec1728391bb66af *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -echo "Verifying file PGP signature..." && \ -gpg --batch --verify leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -gpgconf --kill all && \ -rm -rf "$GNUPGHOME" leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -mkdir -p /usr/share/java && \ -mv leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar && \ -apt-get purge -y --auto-remove gnupg wget - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.11.1 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.11.1"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/debian-bookworm-slim-20/lein/entrypoint b/target/debian-bookworm-slim-20/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/debian-bookworm-slim-20/lein/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=lein - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bookworm-slim-20/tools-deps/Dockerfile b/target/debian-bookworm-slim-20/tools-deps/Dockerfile deleted file mode 100644 index 16edf74d..00000000 --- a/target/debian-bookworm-slim-20/tools-deps/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:bookworm-slim - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV CLOJURE_VERSION=1.11.1.1413 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y curl make git rlwrap wget && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "ad9aa1e99c59a4f7eb66450914fbec543337d9fada60dd9d34eec7fe18ae4965 *linux-install-$CLOJURE_VERSION.sh" | sha256sum -c - && \ -chmod +x linux-install-$CLOJURE_VERSION.sh && \ -./linux-install-$CLOJURE_VERSION.sh && \ -rm linux-install-$CLOJURE_VERSION.sh && \ -clojure -e "(clojure-version)" && \ -apt-get purge -y --auto-remove curl wget - -# Docker bug makes rlwrap crash w/o short sleep first -# Bug: https://github.com/moby/moby/issues/28009 -# As of 2021-09-10 this bug still exists, despite that issue being closed -COPY rlwrap.retry /usr/local/bin/rlwrap - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["-M", "--repl"] diff --git a/target/debian-bookworm-slim-20/tools-deps/entrypoint b/target/debian-bookworm-slim-20/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/debian-bookworm-slim-20/tools-deps/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=clj - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bookworm-slim-20/tools-deps/rlwrap.retry b/target/debian-bookworm-slim-20/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/debian-bookworm-slim-20/tools-deps/rlwrap.retry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# This script works around a Docker bug that prevents rlwrap from starting -# right when a container is first started. It is intended to replace -# /usr/bin/rlwrap and also be named rlwrap but earlier in the PATH -# (e.g. /usr/local/bin). - -max_tries=100 # 100 tries is ~1 second -try=0 - -while true; do - # see if rlwrap can start at all - output=$(/usr/bin/rlwrap true 2>&1 >/dev/null) - exit_code=$? - if [ $exit_code -gt 0 ]; then - # it didn't start - try=$((try+1)) - if [ $try -gt $max_tries ]; then - # we're at max attempts so output the error and exit w/ the same code - echo "$output" >&2 - exit $exit_code - else - # wait a bit and try again - sleep 0.01 - fi - else - # rlwrap can start so let's run it for real - exec /usr/bin/rlwrap "$@" - fi -done diff --git a/target/debian-bullseye-20/lein/Dockerfile b/target/debian-bullseye-20/lein/Dockerfile deleted file mode 100644 index 07a66858..00000000 --- a/target/debian-bullseye-20/lein/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian:bullseye - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV LEIN_VERSION=2.10.0 -ENV LEIN_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# Download the whole repo as an archive -RUN set -eux; \ -apt-get update && \ -apt-get install -y make gnupg wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://codeberg.org/leiningen/leiningen/raw/tag/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "b1757ce941e4cbf15cbf649b7b4f413365e612da892d22841ec1728391bb66af *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -echo "Verifying file PGP signature..." && \ -gpg --batch --verify leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -gpgconf --kill all && \ -rm -rf "$GNUPGHOME" leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -mkdir -p /usr/share/java && \ -mv leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar && \ -apt-get purge -y --auto-remove gnupg wget - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.11.1 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.11.1"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/debian-bullseye-20/lein/entrypoint b/target/debian-bullseye-20/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/debian-bullseye-20/lein/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=lein - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bullseye-20/tools-deps/Dockerfile b/target/debian-bullseye-20/tools-deps/Dockerfile deleted file mode 100644 index af637593..00000000 --- a/target/debian-bullseye-20/tools-deps/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:bullseye - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV CLOJURE_VERSION=1.11.1.1413 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y curl make git rlwrap wget && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "ad9aa1e99c59a4f7eb66450914fbec543337d9fada60dd9d34eec7fe18ae4965 *linux-install-$CLOJURE_VERSION.sh" | sha256sum -c - && \ -chmod +x linux-install-$CLOJURE_VERSION.sh && \ -./linux-install-$CLOJURE_VERSION.sh && \ -rm linux-install-$CLOJURE_VERSION.sh && \ -clojure -e "(clojure-version)" && \ -apt-get purge -y --auto-remove curl wget - -# Docker bug makes rlwrap crash w/o short sleep first -# Bug: https://github.com/moby/moby/issues/28009 -# As of 2021-09-10 this bug still exists, despite that issue being closed -COPY rlwrap.retry /usr/local/bin/rlwrap - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["-M", "--repl"] diff --git a/target/debian-bullseye-20/tools-deps/entrypoint b/target/debian-bullseye-20/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/debian-bullseye-20/tools-deps/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=clj - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bullseye-20/tools-deps/rlwrap.retry b/target/debian-bullseye-20/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/debian-bullseye-20/tools-deps/rlwrap.retry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# This script works around a Docker bug that prevents rlwrap from starting -# right when a container is first started. It is intended to replace -# /usr/bin/rlwrap and also be named rlwrap but earlier in the PATH -# (e.g. /usr/local/bin). - -max_tries=100 # 100 tries is ~1 second -try=0 - -while true; do - # see if rlwrap can start at all - output=$(/usr/bin/rlwrap true 2>&1 >/dev/null) - exit_code=$? - if [ $exit_code -gt 0 ]; then - # it didn't start - try=$((try+1)) - if [ $try -gt $max_tries ]; then - # we're at max attempts so output the error and exit w/ the same code - echo "$output" >&2 - exit $exit_code - else - # wait a bit and try again - sleep 0.01 - fi - else - # rlwrap can start so let's run it for real - exec /usr/bin/rlwrap "$@" - fi -done diff --git a/target/debian-bullseye-slim-20/lein/Dockerfile b/target/debian-bullseye-slim-20/lein/Dockerfile deleted file mode 100644 index d73f02aa..00000000 --- a/target/debian-bullseye-slim-20/lein/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -FROM debian:bullseye-slim - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV LEIN_VERSION=2.10.0 -ENV LEIN_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# Download the whole repo as an archive -RUN set -eux; \ -apt-get update && \ -apt-get install -y gnupg wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://codeberg.org/leiningen/leiningen/raw/tag/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "b1757ce941e4cbf15cbf649b7b4f413365e612da892d22841ec1728391bb66af *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -echo "Verifying file PGP signature..." && \ -gpg --batch --verify leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -gpgconf --kill all && \ -rm -rf "$GNUPGHOME" leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -mkdir -p /usr/share/java && \ -mv leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar && \ -apt-get purge -y --auto-remove gnupg wget - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.11.1 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.11.1"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/debian-bullseye-slim-20/lein/entrypoint b/target/debian-bullseye-slim-20/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/debian-bullseye-slim-20/lein/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=lein - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bullseye-slim-20/tools-deps/Dockerfile b/target/debian-bullseye-slim-20/tools-deps/Dockerfile deleted file mode 100644 index 4ae67003..00000000 --- a/target/debian-bullseye-slim-20/tools-deps/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM debian:bullseye-slim - -ENV JAVA_HOME=/opt/java/openjdk -COPY --from=eclipse-temurin:20 $JAVA_HOME $JAVA_HOME -ENV PATH="${JAVA_HOME}/bin:${PATH}" - -ENV CLOJURE_VERSION=1.11.1.1413 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y curl make git rlwrap wget && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "ad9aa1e99c59a4f7eb66450914fbec543337d9fada60dd9d34eec7fe18ae4965 *linux-install-$CLOJURE_VERSION.sh" | sha256sum -c - && \ -chmod +x linux-install-$CLOJURE_VERSION.sh && \ -./linux-install-$CLOJURE_VERSION.sh && \ -rm linux-install-$CLOJURE_VERSION.sh && \ -clojure -e "(clojure-version)" && \ -apt-get purge -y --auto-remove curl wget - -# Docker bug makes rlwrap crash w/o short sleep first -# Bug: https://github.com/moby/moby/issues/28009 -# As of 2021-09-10 this bug still exists, despite that issue being closed -COPY rlwrap.retry /usr/local/bin/rlwrap - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["-M", "--repl"] diff --git a/target/debian-bullseye-slim-20/tools-deps/entrypoint b/target/debian-bullseye-slim-20/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/debian-bullseye-slim-20/tools-deps/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=clj - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/debian-bullseye-slim-20/tools-deps/rlwrap.retry b/target/debian-bullseye-slim-20/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/debian-bullseye-slim-20/tools-deps/rlwrap.retry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# This script works around a Docker bug that prevents rlwrap from starting -# right when a container is first started. It is intended to replace -# /usr/bin/rlwrap and also be named rlwrap but earlier in the PATH -# (e.g. /usr/local/bin). - -max_tries=100 # 100 tries is ~1 second -try=0 - -while true; do - # see if rlwrap can start at all - output=$(/usr/bin/rlwrap true 2>&1 >/dev/null) - exit_code=$? - if [ $exit_code -gt 0 ]; then - # it didn't start - try=$((try+1)) - if [ $try -gt $max_tries ]; then - # we're at max attempts so output the error and exit w/ the same code - echo "$output" >&2 - exit $exit_code - else - # wait a bit and try again - sleep 0.01 - fi - else - # rlwrap can start so let's run it for real - exec /usr/bin/rlwrap "$@" - fi -done diff --git a/target/eclipse-temurin-20-jdk-alpine/lein/Dockerfile b/target/eclipse-temurin-20-jdk-alpine/lein/Dockerfile deleted file mode 100644 index 03f1df1a..00000000 --- a/target/eclipse-temurin-20-jdk-alpine/lein/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -FROM eclipse-temurin:20-jdk-alpine - -ENV LEIN_VERSION=2.10.0 -ENV LEIN_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# Download the whole repo as an archive -RUN set -eux; \ -apk add --no-cache ca-certificates bash tar openssl gnupg && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://codeberg.org/leiningen/leiningen/raw/tag/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "b1757ce941e4cbf15cbf649b7b4f413365e612da892d22841ec1728391bb66af *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -echo "Verifying file PGP signature..." && \ -gpg --batch --verify leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -gpgconf --kill all && \ -rm -rf "$GNUPGHOME" leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -mkdir -p /usr/share/java && \ -mv leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar && \ -apk del ca-certificates tar openssl gnupg - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.11.1 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.11.1"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/eclipse-temurin-20-jdk-alpine/lein/entrypoint b/target/eclipse-temurin-20-jdk-alpine/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/eclipse-temurin-20-jdk-alpine/lein/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=lein - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/eclipse-temurin-20-jdk-alpine/tools-deps/Dockerfile b/target/eclipse-temurin-20-jdk-alpine/tools-deps/Dockerfile deleted file mode 100644 index 108b0043..00000000 --- a/target/eclipse-temurin-20-jdk-alpine/tools-deps/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM eclipse-temurin:20-jdk-alpine - -ENV CLOJURE_VERSION=1.11.1.1413 - -WORKDIR /tmp - -RUN \ -apk add --no-cache curl bash make git && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "ad9aa1e99c59a4f7eb66450914fbec543337d9fada60dd9d34eec7fe18ae4965 *linux-install-$CLOJURE_VERSION.sh" | sha256sum -c - && \ -chmod +x linux-install-$CLOJURE_VERSION.sh && \ -./linux-install-$CLOJURE_VERSION.sh && \ -rm linux-install-$CLOJURE_VERSION.sh && \ -clojure -e "(clojure-version)" && \ -apk del curl - -# Docker bug makes rlwrap crash w/o short sleep first -# Bug: https://github.com/moby/moby/issues/28009 -# As of 2021-09-10 this bug still exists, despite that issue being closed -COPY rlwrap.retry /usr/local/bin/rlwrap - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["-M", "--repl"] diff --git a/target/eclipse-temurin-20-jdk-alpine/tools-deps/entrypoint b/target/eclipse-temurin-20-jdk-alpine/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/eclipse-temurin-20-jdk-alpine/tools-deps/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=clj - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/eclipse-temurin-20-jdk-alpine/tools-deps/rlwrap.retry b/target/eclipse-temurin-20-jdk-alpine/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/eclipse-temurin-20-jdk-alpine/tools-deps/rlwrap.retry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# This script works around a Docker bug that prevents rlwrap from starting -# right when a container is first started. It is intended to replace -# /usr/bin/rlwrap and also be named rlwrap but earlier in the PATH -# (e.g. /usr/local/bin). - -max_tries=100 # 100 tries is ~1 second -try=0 - -while true; do - # see if rlwrap can start at all - output=$(/usr/bin/rlwrap true 2>&1 >/dev/null) - exit_code=$? - if [ $exit_code -gt 0 ]; then - # it didn't start - try=$((try+1)) - if [ $try -gt $max_tries ]; then - # we're at max attempts so output the error and exit w/ the same code - echo "$output" >&2 - exit $exit_code - else - # wait a bit and try again - sleep 0.01 - fi - else - # rlwrap can start so let's run it for real - exec /usr/bin/rlwrap "$@" - fi -done diff --git a/target/eclipse-temurin-20-jdk-jammy/lein/Dockerfile b/target/eclipse-temurin-20-jdk-jammy/lein/Dockerfile deleted file mode 100644 index 000179b3..00000000 --- a/target/eclipse-temurin-20-jdk-jammy/lein/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM eclipse-temurin:20-jdk-jammy - -ENV LEIN_VERSION=2.10.0 -ENV LEIN_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# Download the whole repo as an archive -RUN set -eux; \ -apt-get update && \ -apt-get install -y make gnupg wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://codeberg.org/leiningen/leiningen/raw/tag/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "b1757ce941e4cbf15cbf649b7b4f413365e612da892d22841ec1728391bb66af *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -echo "Verifying file PGP signature..." && \ -gpg --batch --verify leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -gpgconf --kill all && \ -rm -rf "$GNUPGHOME" leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -mkdir -p /usr/share/java && \ -mv leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT /usr/share/java/leiningen-$LEIN_VERSION-standalone.jar && \ -apt-get purge -y --auto-remove gnupg wget - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.11.1 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.11.1"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/eclipse-temurin-20-jdk-jammy/lein/entrypoint b/target/eclipse-temurin-20-jdk-jammy/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/eclipse-temurin-20-jdk-jammy/lein/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=lein - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/eclipse-temurin-20-jdk-jammy/tools-deps/Dockerfile b/target/eclipse-temurin-20-jdk-jammy/tools-deps/Dockerfile deleted file mode 100644 index 3bf0c347..00000000 --- a/target/eclipse-temurin-20-jdk-jammy/tools-deps/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM eclipse-temurin:20-jdk-jammy - -ENV CLOJURE_VERSION=1.11.1.1413 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y make git rlwrap wget && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "ad9aa1e99c59a4f7eb66450914fbec543337d9fada60dd9d34eec7fe18ae4965 *linux-install-$CLOJURE_VERSION.sh" | sha256sum -c - && \ -chmod +x linux-install-$CLOJURE_VERSION.sh && \ -./linux-install-$CLOJURE_VERSION.sh && \ -rm linux-install-$CLOJURE_VERSION.sh && \ -clojure -e "(clojure-version)" && \ -apt-get purge -y --auto-remove wget - -# Docker bug makes rlwrap crash w/o short sleep first -# Bug: https://github.com/moby/moby/issues/28009 -# As of 2021-09-10 this bug still exists, despite that issue being closed -COPY rlwrap.retry /usr/local/bin/rlwrap - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["-M", "--repl"] diff --git a/target/eclipse-temurin-20-jdk-jammy/tools-deps/entrypoint b/target/eclipse-temurin-20-jdk-jammy/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/eclipse-temurin-20-jdk-jammy/tools-deps/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=clj - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/eclipse-temurin-20-jdk-jammy/tools-deps/rlwrap.retry b/target/eclipse-temurin-20-jdk-jammy/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/eclipse-temurin-20-jdk-jammy/tools-deps/rlwrap.retry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# This script works around a Docker bug that prevents rlwrap from starting -# right when a container is first started. It is intended to replace -# /usr/bin/rlwrap and also be named rlwrap but earlier in the PATH -# (e.g. /usr/local/bin). - -max_tries=100 # 100 tries is ~1 second -try=0 - -while true; do - # see if rlwrap can start at all - output=$(/usr/bin/rlwrap true 2>&1 >/dev/null) - exit_code=$? - if [ $exit_code -gt 0 ]; then - # it didn't start - try=$((try+1)) - if [ $try -gt $max_tries ]; then - # we're at max attempts so output the error and exit w/ the same code - echo "$output" >&2 - exit $exit_code - else - # wait a bit and try again - sleep 0.01 - fi - else - # rlwrap can start so let's run it for real - exec /usr/bin/rlwrap "$@" - fi -done