diff --git a/src/docker_clojure/core.clj b/src/docker_clojure/core.clj index 23ebdc4a..b7d6e359 100644 --- a/src/docker_clojure/core.clj +++ b/src/docker_clojure/core.clj @@ -1,10 +1,10 @@ (ns docker-clojure.core (:require - [clojure.java.shell :refer [sh with-sh-dir]] - [clojure.math.combinatorics :as combo] - [clojure.spec.alpha :as s] - [clojure.string :as str] - [docker-clojure.dockerfile :as df])) + [clojure.java.shell :refer [sh with-sh-dir]] + [clojure.math.combinatorics :as combo] + [clojure.spec.alpha :as s] + [clojure.string :as str] + [docker-clojure.dockerfile :as df])) (s/def ::non-blank-string (s/and string? #(not (str/blank? %)))) @@ -31,19 +31,30 @@ (s/def ::maintainers (s/coll-of ::non-blank-string :distinct true :into #{})) -(def base-image "openjdk") +(def jdk-versions #{8 11 17 18}) -(def jdk-versions #{8 11 17 18 19}) +(def base-images + "Map of JDK version to base image name with :default as a fallback" + {8 "openjdk" + 11 "openjdk" + :default "eclipse-temurin"}) ;; The default JDK version to use for tags that don't specify one; usually the latest LTS release (def default-jdk-version 17) (def distros - #{:debian/buster :debian-slim/slim-buster :debian/bullseye :debian-slim/slim-bullseye :alpine/alpine}) + "Map of base image name to set of distro tags to use, namespaced by Linux + distro type. :default key is a fallback for base images not o/w specified." + {"openjdk" #{:debian/buster :debian-slim/slim-buster :debian/bullseye + :debian-slim/slim-bullseye :alpine/alpine} + :default #{:alpine/alpine :ubuntu/focal}}) -;; The default distro to use for tags that don't specify one, keyed by jdk-version. (def default-distros - {:default :debian-slim/slim-bullseye}) + "The default distro to use for tags that don't specify one, keyed by jdk-version. + :default is a fallback for jdk versions not o/w specified." + {8 :debian-slim/slim-bullseye + 11 :debian-slim/slim-bullseye + :default :ubuntu/focal}) (def build-tools {"lein" "2.9.8" @@ -72,8 +83,10 @@ (def maintainers "Paul Lam & Wes Morgan ") -(defn default-distro [jdk-version] - (get default-distros jdk-version (:default default-distros))) +(defn get-or-default + "Returns the value in map m for key k or else the value for key :default." + [m k] + (get m k (get m :default))) (defn contains-every-key-value? "Returns true if the map `haystack` contains every key-value pair in the map @@ -85,8 +98,12 @@ (= v (get haystack k))) needles)) -(defn base-image-name [jdk-version distro] - (str base-image ":" jdk-version "-" (name distro))) +(defn base-image-tag [base-image jdk-version distro] + (str base-image ":" jdk-version + (case base-image + "eclipse-temurin" "-jdk-" + "-") + (name distro))) (defn exclude? "Returns true if `variant` matches one of `exclusions` elements (meaning @@ -94,16 +111,24 @@ [exclusions variant] (some (partial contains-every-key-value? variant) exclusions)) +(defn jdk-label [jdk-version base-image] + (if (= default-jdk-version jdk-version) + nil + (str + (case base-image + "eclipse-temurin" "temurin" + base-image) + "-" jdk-version))) + (defn docker-tag - [{:keys [jdk-version distro build-tool build-tool-version]}] + [{:keys [base-image jdk-version distro build-tool + build-tool-version]}] (if (= ::all build-tool) "latest" - (let [jdk-label (if (= default-jdk-version jdk-version) - nil - (str base-image "-" jdk-version)) - dd (default-distro jdk-version) + (let [jdk (jdk-label jdk-version base-image) + dd (get-or-default default-distros jdk-version) distro-label (if (= dd distro) nil (when distro (name distro)))] - (str/join "-" (remove nil? [jdk-label build-tool build-tool-version + (str/join "-" (remove nil? [jdk build-tool build-tool-version distro-label]))))) (s/def ::variant @@ -116,9 +141,10 @@ (assoc m k v) m)) -(defn variant-map [[jdk-version distro [build-tool build-tool-version]]] +(defn variant-map [[base-image jdk-version distro [build-tool build-tool-version]]] (let [base {:jdk-version jdk-version - :base-image (base-image-name jdk-version distro) + :base-image base-image + :base-image-tag (base-image-tag base-image jdk-version distro) :distro distro :build-tool build-tool :build-tool-version build-tool-version @@ -132,7 +158,7 @@ (defn generate-dockerfile! [installer-hashes variant] (let [build-dir (df/build-dir variant) - filename "Dockerfile"] + filename "Dockerfile"] (println "Generating" (str build-dir "/" filename)) (df/write-file build-dir filename installer-hashes variant) (assoc variant @@ -162,14 +188,32 @@ (def latest-variant "The latest variant is special because we include all 3 build tools via the [::all] value on the end." - (list default-jdk-version (default-distro default-jdk-version) [::all])) - -(defn image-variants [jdk-versions distros build-tools] - (->> (combo/cartesian-product jdk-versions distros build-tools) - (cons latest-variant) - (map variant-map) - (remove #(= ::s/invalid (s/conform ::variant %))) - set)) + (list (:default base-images) + default-jdk-version + (get-or-default default-distros default-jdk-version) + [::all])) + +(defn image-variant-combinations [base-images jdk-versions distros build-tools] + (reduce + (fn [variants jdk-version] + (concat + variants + (let [base-image (get-or-default base-images jdk-version)] + (combo/cartesian-product #{(get-or-default base-images jdk-version)} + #{jdk-version} + (get-or-default distros base-image) + build-tools)))) + #{} jdk-versions)) + +(defn image-variants [base-images jdk-versions distros build-tools] + (into #{} + (comp + (map variant-map) + (remove #(= ::s/invalid (s/conform ::variant %)))) + (conj + (image-variant-combinations base-images jdk-versions distros + build-tools) + latest-variant))) (defn build-images [installer-hashes variants] (println "Building images") @@ -182,7 +226,7 @@ (defn valid-variants [] (remove (partial exclude? exclusions) - (image-variants jdk-versions distros build-tools))) + (image-variants base-images jdk-versions distros build-tools))) (defn -main [& args] (case (first args) diff --git a/src/docker_clojure/dockerfile.clj b/src/docker_clojure/dockerfile.clj index 33751cd4..961b5619 100644 --- a/src/docker_clojure/dockerfile.clj +++ b/src/docker_clojure/dockerfile.clj @@ -7,9 +7,9 @@ [docker-clojure.dockerfile.tools-deps :as tools-deps] [docker-clojure.dockerfile.shared :refer :all])) -(defn build-dir [{:keys [base-image build-tool]}] +(defn build-dir [{:keys [base-image-tag build-tool]}] (str/join "/" ["target" - (str/replace base-image ":" "-") + (str/replace base-image-tag ":" "-") (if (= :docker-clojure.core/all build-tool) "latest" build-tool)])) @@ -40,7 +40,7 @@ (defn contents [installer-hashes {:keys [build-tool] :as variant}] (str/join "\n" - (concat [(format "FROM %s" (:base-image variant)) + (concat [(format "FROM %s" (:base-image-tag variant)) ""] (case build-tool :docker-clojure.core/all (all-contents installer-hashes variant) diff --git a/src/docker_clojure/dockerfile/boot.clj b/src/docker_clojure/dockerfile/boot.clj index 9bb54ec0..b4c4b60c 100644 --- a/src/docker_clojure/dockerfile/boot.clj +++ b/src/docker_clojure/dockerfile/boot.clj @@ -7,6 +7,8 @@ {:debian-slim {:build #{"wget"} :runtime #{}} :debian {:runtime #{"make"}} + :ubuntu {:build #{"wget"} + :runtime #{}} :alpine {:build #{"openssl"} :runtime #{"bash"}}}) diff --git a/src/docker_clojure/dockerfile/lein.clj b/src/docker_clojure/dockerfile/lein.clj index f9c79b77..7113f5af 100644 --- a/src/docker_clojure/dockerfile/lein.clj +++ b/src/docker_clojure/dockerfile/lein.clj @@ -8,6 +8,8 @@ :runtime #{}} :debian {:build #{"gnupg"} :runtime #{"make"}} + :ubuntu {:build #{"wget" "gnupg"} + :runtime #{"make"}} :alpine {:build #{"tar" "gnupg" "openssl" "ca-certificates"} :runtime #{"bash"}}}) diff --git a/src/docker_clojure/dockerfile/shared.clj b/src/docker_clojure/dockerfile/shared.clj index 1cd8edc6..5ab360fd 100644 --- a/src/docker_clojure/dockerfile/shared.clj +++ b/src/docker_clojure/dockerfile/shared.clj @@ -26,7 +26,7 @@ (let [deps (all-deps distro-deps distro)] (when (seq deps) (case (-> distro namespace keyword) - (:debian :debian-slim) + (:debian :debian-slim :ubuntu) ["apt-get update" (str/join " " (concat ["apt-get install -y"] deps)) "rm -rf /var/lib/apt/lists/*"] @@ -40,7 +40,7 @@ (let [deps (build-deps distro-deps distro)] (when (seq deps) (case (-> distro namespace keyword) - (:debian :debian-slim) + (:debian :debian-slim :ubuntu) [(str/join " " (concat ["apt-get purge -y --auto-remove"] deps))] :alpine diff --git a/src/docker_clojure/dockerfile/tools_deps.clj b/src/docker_clojure/dockerfile/tools_deps.clj index 63abd150..dd7f9849 100644 --- a/src/docker_clojure/dockerfile/tools_deps.clj +++ b/src/docker_clojure/dockerfile/tools_deps.clj @@ -10,6 +10,8 @@ :runtime #{"rlwrap" "make" "git"}} :debian {:build #{} :runtime #{"rlwrap" "make"}} + :ubuntu {:build #{"wget"} + :runtime #{"rlwrap" "make" "git"}} :alpine {:build #{"curl"} :runtime #{"bash" "make" "git"}}}) diff --git a/target/openjdk-18-slim-bullseye/boot/Dockerfile b/target/eclipse-temurin-17-jdk-focal/boot/Dockerfile similarity index 96% rename from target/openjdk-18-slim-bullseye/boot/Dockerfile rename to target/eclipse-temurin-17-jdk-focal/boot/Dockerfile index 78b822fa..946d0734 100644 --- a/target/openjdk-18-slim-bullseye/boot/Dockerfile +++ b/target/eclipse-temurin-17-jdk-focal/boot/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:18-slim-bullseye +FROM eclipse-temurin:17-jdk-focal ENV BOOT_VERSION=2.8.3 ENV BOOT_INSTALL=/usr/local/bin/ diff --git a/target/openjdk-17-bullseye/boot/entrypoint b/target/eclipse-temurin-17-jdk-focal/boot/entrypoint similarity index 100% rename from target/openjdk-17-bullseye/boot/entrypoint rename to target/eclipse-temurin-17-jdk-focal/boot/entrypoint diff --git a/target/openjdk-17-slim-bullseye/latest/Dockerfile b/target/eclipse-temurin-17-jdk-focal/latest/Dockerfile similarity index 95% rename from target/openjdk-17-slim-bullseye/latest/Dockerfile rename to target/eclipse-temurin-17-jdk-focal/latest/Dockerfile index 2afb23d6..8e7f46f3 100644 --- a/target/openjdk-17-slim-bullseye/latest/Dockerfile +++ b/target/eclipse-temurin-17-jdk-focal/latest/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:17-slim-bullseye +FROM eclipse-temurin:17-jdk-focal ### INSTALL BOOT ### ENV BOOT_VERSION=2.8.3 @@ -36,7 +36,7 @@ WORKDIR /tmp # Download the whole repo as an archive RUN set -eux; \ apt-get update && \ -apt-get install -y gnupg wget && \ +apt-get install -y make gnupg wget && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p $LEIN_INSTALL && \ wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ @@ -77,7 +77,7 @@ WORKDIR /tmp RUN \ apt-get update && \ -apt-get install -y curl make git rlwrap wget && \ +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 && \ @@ -86,7 +86,7 @@ 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 +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 diff --git a/target/openjdk-17-bullseye/tools-deps/entrypoint b/target/eclipse-temurin-17-jdk-focal/latest/entrypoint similarity index 100% rename from target/openjdk-17-bullseye/tools-deps/entrypoint rename to target/eclipse-temurin-17-jdk-focal/latest/entrypoint diff --git a/target/openjdk-17-bullseye/tools-deps/rlwrap.retry b/target/eclipse-temurin-17-jdk-focal/latest/rlwrap.retry similarity index 100% rename from target/openjdk-17-bullseye/tools-deps/rlwrap.retry rename to target/eclipse-temurin-17-jdk-focal/latest/rlwrap.retry diff --git a/target/openjdk-18-slim-bullseye/lein/Dockerfile b/target/eclipse-temurin-17-jdk-focal/lein/Dockerfile similarity index 96% rename from target/openjdk-18-slim-bullseye/lein/Dockerfile rename to target/eclipse-temurin-17-jdk-focal/lein/Dockerfile index a7e052ec..45e32707 100644 --- a/target/openjdk-18-slim-bullseye/lein/Dockerfile +++ b/target/eclipse-temurin-17-jdk-focal/lein/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:18-slim-bullseye +FROM eclipse-temurin:17-jdk-focal ENV LEIN_VERSION=2.9.8 ENV LEIN_INSTALL=/usr/local/bin/ @@ -8,7 +8,7 @@ WORKDIR /tmp # Download the whole repo as an archive RUN set -eux; \ apt-get update && \ -apt-get install -y gnupg wget && \ +apt-get install -y make gnupg wget && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p $LEIN_INSTALL && \ wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ diff --git a/target/openjdk-17-bullseye/lein/entrypoint b/target/eclipse-temurin-17-jdk-focal/lein/entrypoint similarity index 100% rename from target/openjdk-17-bullseye/lein/entrypoint rename to target/eclipse-temurin-17-jdk-focal/lein/entrypoint diff --git a/target/openjdk-17-slim-buster/tools-deps/Dockerfile b/target/eclipse-temurin-17-jdk-focal/tools-deps/Dockerfile similarity index 87% rename from target/openjdk-17-slim-buster/tools-deps/Dockerfile rename to target/eclipse-temurin-17-jdk-focal/tools-deps/Dockerfile index 53d4492d..8f42d493 100644 --- a/target/openjdk-17-slim-buster/tools-deps/Dockerfile +++ b/target/eclipse-temurin-17-jdk-focal/tools-deps/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:17-slim-buster +FROM eclipse-temurin:17-jdk-focal ENV CLOJURE_VERSION=1.11.1.1113 @@ -6,7 +6,7 @@ WORKDIR /tmp RUN \ apt-get update && \ -apt-get install -y curl make git rlwrap wget && \ +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 && \ @@ -15,7 +15,7 @@ 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 +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 diff --git a/target/openjdk-17-buster/tools-deps/entrypoint b/target/eclipse-temurin-17-jdk-focal/tools-deps/entrypoint similarity index 100% rename from target/openjdk-17-buster/tools-deps/entrypoint rename to target/eclipse-temurin-17-jdk-focal/tools-deps/entrypoint diff --git a/target/openjdk-17-buster/tools-deps/rlwrap.retry b/target/eclipse-temurin-17-jdk-focal/tools-deps/rlwrap.retry similarity index 100% rename from target/openjdk-17-buster/tools-deps/rlwrap.retry rename to target/eclipse-temurin-17-jdk-focal/tools-deps/rlwrap.retry diff --git a/target/openjdk-17-slim-bullseye/boot/Dockerfile b/target/eclipse-temurin-18-jdk-focal/boot/Dockerfile similarity index 96% rename from target/openjdk-17-slim-bullseye/boot/Dockerfile rename to target/eclipse-temurin-18-jdk-focal/boot/Dockerfile index 58d43907..b17b5a02 100644 --- a/target/openjdk-17-slim-bullseye/boot/Dockerfile +++ b/target/eclipse-temurin-18-jdk-focal/boot/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:17-slim-bullseye +FROM eclipse-temurin:18-jdk-focal ENV BOOT_VERSION=2.8.3 ENV BOOT_INSTALL=/usr/local/bin/ diff --git a/target/openjdk-17-buster/boot/entrypoint b/target/eclipse-temurin-18-jdk-focal/boot/entrypoint similarity index 100% rename from target/openjdk-17-buster/boot/entrypoint rename to target/eclipse-temurin-18-jdk-focal/boot/entrypoint diff --git a/target/openjdk-18-slim-buster/lein/Dockerfile b/target/eclipse-temurin-18-jdk-focal/lein/Dockerfile similarity index 96% rename from target/openjdk-18-slim-buster/lein/Dockerfile rename to target/eclipse-temurin-18-jdk-focal/lein/Dockerfile index f545cce9..89ab4949 100644 --- a/target/openjdk-18-slim-buster/lein/Dockerfile +++ b/target/eclipse-temurin-18-jdk-focal/lein/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:18-slim-buster +FROM eclipse-temurin:18-jdk-focal ENV LEIN_VERSION=2.9.8 ENV LEIN_INSTALL=/usr/local/bin/ @@ -8,7 +8,7 @@ WORKDIR /tmp # Download the whole repo as an archive RUN set -eux; \ apt-get update && \ -apt-get install -y gnupg wget && \ +apt-get install -y make gnupg wget && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p $LEIN_INSTALL && \ wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ diff --git a/target/openjdk-17-buster/lein/entrypoint b/target/eclipse-temurin-18-jdk-focal/lein/entrypoint similarity index 100% rename from target/openjdk-17-buster/lein/entrypoint rename to target/eclipse-temurin-18-jdk-focal/lein/entrypoint diff --git a/target/openjdk-19-slim-buster/tools-deps/Dockerfile b/target/eclipse-temurin-18-jdk-focal/tools-deps/Dockerfile similarity index 87% rename from target/openjdk-19-slim-buster/tools-deps/Dockerfile rename to target/eclipse-temurin-18-jdk-focal/tools-deps/Dockerfile index 76070fa4..10a289b3 100644 --- a/target/openjdk-19-slim-buster/tools-deps/Dockerfile +++ b/target/eclipse-temurin-18-jdk-focal/tools-deps/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:19-slim-buster +FROM eclipse-temurin:18-jdk-focal ENV CLOJURE_VERSION=1.11.1.1113 @@ -6,7 +6,7 @@ WORKDIR /tmp RUN \ apt-get update && \ -apt-get install -y curl make git rlwrap wget && \ +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 && \ @@ -15,7 +15,7 @@ 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 +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 diff --git a/target/openjdk-17-slim-bullseye/latest/entrypoint b/target/eclipse-temurin-18-jdk-focal/tools-deps/entrypoint similarity index 100% rename from target/openjdk-17-slim-bullseye/latest/entrypoint rename to target/eclipse-temurin-18-jdk-focal/tools-deps/entrypoint diff --git a/target/openjdk-17-slim-bullseye/latest/rlwrap.retry b/target/eclipse-temurin-18-jdk-focal/tools-deps/rlwrap.retry similarity index 100% rename from target/openjdk-17-slim-bullseye/latest/rlwrap.retry rename to target/eclipse-temurin-18-jdk-focal/tools-deps/rlwrap.retry diff --git a/target/openjdk-17-bullseye/boot/Dockerfile b/target/openjdk-17-bullseye/boot/Dockerfile deleted file mode 100644 index dc3bbd75..00000000 --- a/target/openjdk-17-bullseye/boot/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM openjdk:17-bullseye - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y make && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-17-bullseye/lein/Dockerfile b/target/openjdk-17-bullseye/lein/Dockerfile deleted file mode 100644 index d1bfc976..00000000 --- a/target/openjdk-17-bullseye/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:17-bullseye - -ENV LEIN_VERSION=2.9.8 -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 && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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 - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-17-bullseye/tools-deps/Dockerfile b/target/openjdk-17-bullseye/tools-deps/Dockerfile deleted file mode 100644 index 8a8cf6f3..00000000 --- a/target/openjdk-17-bullseye/tools-deps/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM openjdk:17-bullseye - -ENV CLOJURE_VERSION=1.11.1.1113 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y make rlwrap && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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)" - -# 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/openjdk-17-buster/boot/Dockerfile b/target/openjdk-17-buster/boot/Dockerfile deleted file mode 100644 index d4eb8605..00000000 --- a/target/openjdk-17-buster/boot/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM openjdk:17-buster - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y make && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-17-buster/lein/Dockerfile b/target/openjdk-17-buster/lein/Dockerfile deleted file mode 100644 index 46ead541..00000000 --- a/target/openjdk-17-buster/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:17-buster - -ENV LEIN_VERSION=2.9.8 -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 && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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 - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-17-buster/tools-deps/Dockerfile b/target/openjdk-17-buster/tools-deps/Dockerfile deleted file mode 100644 index 6065778b..00000000 --- a/target/openjdk-17-buster/tools-deps/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM openjdk:17-buster - -ENV CLOJURE_VERSION=1.11.1.1113 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y make rlwrap && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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)" - -# 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/openjdk-17-slim-bullseye/boot/entrypoint b/target/openjdk-17-slim-bullseye/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-17-slim-bullseye/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-17-slim-bullseye/lein/Dockerfile b/target/openjdk-17-slim-bullseye/lein/Dockerfile deleted file mode 100644 index 1aabcb03..00000000 --- a/target/openjdk-17-slim-bullseye/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:17-slim-bullseye - -ENV LEIN_VERSION=2.9.8 -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://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-17-slim-bullseye/lein/entrypoint b/target/openjdk-17-slim-bullseye/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-17-slim-bullseye/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/openjdk-17-slim-bullseye/tools-deps/Dockerfile b/target/openjdk-17-slim-bullseye/tools-deps/Dockerfile deleted file mode 100644 index 9dc78603..00000000 --- a/target/openjdk-17-slim-bullseye/tools-deps/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM openjdk:17-slim-bullseye - -ENV CLOJURE_VERSION=1.11.1.1113 - -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 "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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/openjdk-17-slim-bullseye/tools-deps/entrypoint b/target/openjdk-17-slim-bullseye/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-17-slim-bullseye/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/openjdk-17-slim-bullseye/tools-deps/rlwrap.retry b/target/openjdk-17-slim-bullseye/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-17-slim-bullseye/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/openjdk-17-slim-buster/boot/Dockerfile b/target/openjdk-17-slim-buster/boot/Dockerfile deleted file mode 100644 index a0e692d5..00000000 --- a/target/openjdk-17-slim-buster/boot/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM openjdk:17-slim-buster - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot && \ -apt-get purge -y --auto-remove wget - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-17-slim-buster/boot/entrypoint b/target/openjdk-17-slim-buster/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-17-slim-buster/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-17-slim-buster/lein/Dockerfile b/target/openjdk-17-slim-buster/lein/Dockerfile deleted file mode 100644 index ba92dd8c..00000000 --- a/target/openjdk-17-slim-buster/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:17-slim-buster - -ENV LEIN_VERSION=2.9.8 -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://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-17-slim-buster/lein/entrypoint b/target/openjdk-17-slim-buster/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-17-slim-buster/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/openjdk-17-slim-buster/tools-deps/entrypoint b/target/openjdk-17-slim-buster/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-17-slim-buster/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/openjdk-17-slim-buster/tools-deps/rlwrap.retry b/target/openjdk-17-slim-buster/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-17-slim-buster/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/openjdk-18-bullseye/boot/Dockerfile b/target/openjdk-18-bullseye/boot/Dockerfile deleted file mode 100644 index 7c690405..00000000 --- a/target/openjdk-18-bullseye/boot/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM openjdk:18-bullseye - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y make && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-18-bullseye/boot/entrypoint b/target/openjdk-18-bullseye/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-18-bullseye/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-18-bullseye/lein/Dockerfile b/target/openjdk-18-bullseye/lein/Dockerfile deleted file mode 100644 index 205c723a..00000000 --- a/target/openjdk-18-bullseye/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:18-bullseye - -ENV LEIN_VERSION=2.9.8 -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 && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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 - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-18-bullseye/lein/entrypoint b/target/openjdk-18-bullseye/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-18-bullseye/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/openjdk-18-bullseye/tools-deps/Dockerfile b/target/openjdk-18-bullseye/tools-deps/Dockerfile deleted file mode 100644 index 75795c76..00000000 --- a/target/openjdk-18-bullseye/tools-deps/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM openjdk:18-bullseye - -ENV CLOJURE_VERSION=1.11.1.1113 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y make rlwrap && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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)" - -# 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/openjdk-18-bullseye/tools-deps/entrypoint b/target/openjdk-18-bullseye/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-18-bullseye/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/openjdk-18-bullseye/tools-deps/rlwrap.retry b/target/openjdk-18-bullseye/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-18-bullseye/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/openjdk-18-buster/boot/Dockerfile b/target/openjdk-18-buster/boot/Dockerfile deleted file mode 100644 index 1bf4c187..00000000 --- a/target/openjdk-18-buster/boot/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM openjdk:18-buster - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y make && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-18-buster/boot/entrypoint b/target/openjdk-18-buster/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-18-buster/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-18-buster/lein/Dockerfile b/target/openjdk-18-buster/lein/Dockerfile deleted file mode 100644 index a8e8bb7a..00000000 --- a/target/openjdk-18-buster/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:18-buster - -ENV LEIN_VERSION=2.9.8 -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 && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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 - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-18-buster/lein/entrypoint b/target/openjdk-18-buster/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-18-buster/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/openjdk-18-buster/tools-deps/Dockerfile b/target/openjdk-18-buster/tools-deps/Dockerfile deleted file mode 100644 index cdafb42e..00000000 --- a/target/openjdk-18-buster/tools-deps/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM openjdk:18-buster - -ENV CLOJURE_VERSION=1.11.1.1113 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y make rlwrap && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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)" - -# 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/openjdk-18-buster/tools-deps/entrypoint b/target/openjdk-18-buster/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-18-buster/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/openjdk-18-buster/tools-deps/rlwrap.retry b/target/openjdk-18-buster/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-18-buster/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/openjdk-18-slim-bullseye/boot/entrypoint b/target/openjdk-18-slim-bullseye/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-18-slim-bullseye/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-18-slim-bullseye/lein/entrypoint b/target/openjdk-18-slim-bullseye/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-18-slim-bullseye/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/openjdk-18-slim-bullseye/tools-deps/Dockerfile b/target/openjdk-18-slim-bullseye/tools-deps/Dockerfile deleted file mode 100644 index fea2b38b..00000000 --- a/target/openjdk-18-slim-bullseye/tools-deps/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM openjdk:18-slim-bullseye - -ENV CLOJURE_VERSION=1.11.1.1113 - -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 "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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/openjdk-18-slim-bullseye/tools-deps/entrypoint b/target/openjdk-18-slim-bullseye/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-18-slim-bullseye/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/openjdk-18-slim-bullseye/tools-deps/rlwrap.retry b/target/openjdk-18-slim-bullseye/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-18-slim-bullseye/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/openjdk-18-slim-buster/boot/Dockerfile b/target/openjdk-18-slim-buster/boot/Dockerfile deleted file mode 100644 index be32cf23..00000000 --- a/target/openjdk-18-slim-buster/boot/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM openjdk:18-slim-buster - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot && \ -apt-get purge -y --auto-remove wget - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-18-slim-buster/boot/entrypoint b/target/openjdk-18-slim-buster/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-18-slim-buster/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-18-slim-buster/lein/entrypoint b/target/openjdk-18-slim-buster/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-18-slim-buster/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/openjdk-18-slim-buster/tools-deps/Dockerfile b/target/openjdk-18-slim-buster/tools-deps/Dockerfile deleted file mode 100644 index 5c405dd5..00000000 --- a/target/openjdk-18-slim-buster/tools-deps/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM openjdk:18-slim-buster - -ENV CLOJURE_VERSION=1.11.1.1113 - -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 "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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/openjdk-18-slim-buster/tools-deps/entrypoint b/target/openjdk-18-slim-buster/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-18-slim-buster/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/openjdk-18-slim-buster/tools-deps/rlwrap.retry b/target/openjdk-18-slim-buster/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-18-slim-buster/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/openjdk-19-alpine/boot/Dockerfile b/target/openjdk-19-alpine/boot/Dockerfile deleted file mode 100644 index de354d04..00000000 --- a/target/openjdk-19-alpine/boot/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -FROM openjdk:19-alpine - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apk add --no-cache bash openssl && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot && \ -apk del openssl - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-alpine/boot/entrypoint b/target/openjdk-19-alpine/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-19-alpine/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-19-alpine/lein/Dockerfile b/target/openjdk-19-alpine/lein/Dockerfile deleted file mode 100644 index f81968b2..00000000 --- a/target/openjdk-19-alpine/lein/Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -FROM openjdk:19-alpine - -ENV LEIN_VERSION=2.9.8 -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://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-alpine/lein/entrypoint b/target/openjdk-19-alpine/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-19-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/openjdk-19-alpine/tools-deps/Dockerfile b/target/openjdk-19-alpine/tools-deps/Dockerfile deleted file mode 100644 index e5c3c1dc..00000000 --- a/target/openjdk-19-alpine/tools-deps/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM openjdk:19-alpine - -ENV CLOJURE_VERSION=1.11.1.1113 - -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 "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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/openjdk-19-alpine/tools-deps/entrypoint b/target/openjdk-19-alpine/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-19-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/openjdk-19-alpine/tools-deps/rlwrap.retry b/target/openjdk-19-alpine/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-19-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/openjdk-19-bullseye/boot/Dockerfile b/target/openjdk-19-bullseye/boot/Dockerfile deleted file mode 100644 index 27dd79af..00000000 --- a/target/openjdk-19-bullseye/boot/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM openjdk:19-bullseye - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y make && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-bullseye/boot/entrypoint b/target/openjdk-19-bullseye/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-19-bullseye/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-19-bullseye/lein/Dockerfile b/target/openjdk-19-bullseye/lein/Dockerfile deleted file mode 100644 index 62b08db2..00000000 --- a/target/openjdk-19-bullseye/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:19-bullseye - -ENV LEIN_VERSION=2.9.8 -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 && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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 - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-bullseye/lein/entrypoint b/target/openjdk-19-bullseye/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-19-bullseye/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/openjdk-19-bullseye/tools-deps/Dockerfile b/target/openjdk-19-bullseye/tools-deps/Dockerfile deleted file mode 100644 index dd0d42c7..00000000 --- a/target/openjdk-19-bullseye/tools-deps/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM openjdk:19-bullseye - -ENV CLOJURE_VERSION=1.11.1.1113 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y make rlwrap && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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)" - -# 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/openjdk-19-bullseye/tools-deps/entrypoint b/target/openjdk-19-bullseye/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-19-bullseye/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/openjdk-19-bullseye/tools-deps/rlwrap.retry b/target/openjdk-19-bullseye/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-19-bullseye/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/openjdk-19-buster/boot/Dockerfile b/target/openjdk-19-buster/boot/Dockerfile deleted file mode 100644 index b94fd172..00000000 --- a/target/openjdk-19-buster/boot/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM openjdk:19-buster - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y make && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-buster/boot/entrypoint b/target/openjdk-19-buster/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-19-buster/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-19-buster/lein/Dockerfile b/target/openjdk-19-buster/lein/Dockerfile deleted file mode 100644 index 32b508d2..00000000 --- a/target/openjdk-19-buster/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:19-buster - -ENV LEIN_VERSION=2.9.8 -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 && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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 - -ENV PATH=$PATH:$LEIN_INSTALL -ENV LEIN_ROOT 1 - -# Install clojure 1.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-buster/lein/entrypoint b/target/openjdk-19-buster/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-19-buster/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/openjdk-19-buster/tools-deps/Dockerfile b/target/openjdk-19-buster/tools-deps/Dockerfile deleted file mode 100644 index 8f4b70fb..00000000 --- a/target/openjdk-19-buster/tools-deps/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM openjdk:19-buster - -ENV CLOJURE_VERSION=1.11.1.1113 - -WORKDIR /tmp - -RUN \ -apt-get update && \ -apt-get install -y make rlwrap && \ -rm -rf /var/lib/apt/lists/* && \ -wget https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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)" - -# 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/openjdk-19-buster/tools-deps/entrypoint b/target/openjdk-19-buster/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-19-buster/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/openjdk-19-buster/tools-deps/rlwrap.retry b/target/openjdk-19-buster/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-19-buster/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/openjdk-19-slim-bullseye/boot/Dockerfile b/target/openjdk-19-slim-bullseye/boot/Dockerfile deleted file mode 100644 index 1cdd9f66..00000000 --- a/target/openjdk-19-slim-bullseye/boot/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM openjdk:19-slim-bullseye - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot && \ -apt-get purge -y --auto-remove wget - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-slim-bullseye/boot/entrypoint b/target/openjdk-19-slim-bullseye/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-19-slim-bullseye/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-19-slim-bullseye/lein/Dockerfile b/target/openjdk-19-slim-bullseye/lein/Dockerfile deleted file mode 100644 index dbcb44d5..00000000 --- a/target/openjdk-19-slim-bullseye/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:19-slim-bullseye - -ENV LEIN_VERSION=2.9.8 -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://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-slim-bullseye/lein/entrypoint b/target/openjdk-19-slim-bullseye/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-19-slim-bullseye/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/openjdk-19-slim-bullseye/tools-deps/Dockerfile b/target/openjdk-19-slim-bullseye/tools-deps/Dockerfile deleted file mode 100644 index 41130c13..00000000 --- a/target/openjdk-19-slim-bullseye/tools-deps/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM openjdk:19-slim-bullseye - -ENV CLOJURE_VERSION=1.11.1.1113 - -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 "7677bb1179ebb15ebf954a87bd1078f1c547673d946dadafd23ece8cd61f5a9f *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/openjdk-19-slim-bullseye/tools-deps/entrypoint b/target/openjdk-19-slim-bullseye/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-19-slim-bullseye/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/openjdk-19-slim-bullseye/tools-deps/rlwrap.retry b/target/openjdk-19-slim-bullseye/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-19-slim-bullseye/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/openjdk-19-slim-buster/boot/Dockerfile b/target/openjdk-19-slim-buster/boot/Dockerfile deleted file mode 100644 index 32e611cd..00000000 --- a/target/openjdk-19-slim-buster/boot/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM openjdk:19-slim-buster - -ENV BOOT_VERSION=2.8.3 -ENV BOOT_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# NOTE: BOOT_VERSION tells the boot.sh script which version of boot to install -# on its first run. We always download the latest version of boot.sh because -# it is just the installer script. -RUN \ -apt-get update && \ -apt-get install -y wget && \ -rm -rf /var/lib/apt/lists/* && \ -mkdir -p $BOOT_INSTALL && \ -wget -q https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && \ -echo "Comparing installer checksum..." && \ -sha256sum boot.sh && \ -echo "0ccd697f2027e7e1cd3be3d62721057cbc841585740d0aaa9fbb485d7b1f17c3 *boot.sh" | sha256sum -c - && \ -mv boot.sh $BOOT_INSTALL/boot && \ -chmod 0755 $BOOT_INSTALL/boot && \ -apt-get purge -y --auto-remove wget - -ENV PATH=$PATH:$BOOT_INSTALL -ENV BOOT_AS_ROOT=yes - -RUN boot - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-slim-buster/boot/entrypoint b/target/openjdk-19-slim-buster/boot/entrypoint deleted file mode 100755 index 2fe72577..00000000 --- a/target/openjdk-19-slim-buster/boot/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=boot - -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/openjdk-19-slim-buster/lein/Dockerfile b/target/openjdk-19-slim-buster/lein/Dockerfile deleted file mode 100644 index 23a201a8..00000000 --- a/target/openjdk-19-slim-buster/lein/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM openjdk:19-slim-buster - -ENV LEIN_VERSION=2.9.8 -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://raw.githubusercontent.com/technomancy/leiningen/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "9952cba539cc6454c3b7385ebce57577087bf2b9001c3ab5c55d668d0aeff6e9 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -if printf '%s\n%s\n' "2.9.7" "$LEIN_VERSION" | sort -cV; then \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys 6A2D483DB59437EBB97D09B1040193357D0606ED; \ - else \ - gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 20242BACBBE95ADA22D0AFD7808A33D379C806C3; \ - FILENAME_EXT=zip; \ - fi && \ -wget -q https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://github.com/technomancy/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.10.3 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.10.3"]])' > project.clj \ - && lein deps && rm project.clj - -COPY entrypoint /usr/local/bin/entrypoint - -ENTRYPOINT ["entrypoint"] -CMD ["repl"] diff --git a/target/openjdk-19-slim-buster/lein/entrypoint b/target/openjdk-19-slim-buster/lein/entrypoint deleted file mode 100755 index ccf8cce5..00000000 --- a/target/openjdk-19-slim-buster/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/openjdk-19-slim-buster/tools-deps/entrypoint b/target/openjdk-19-slim-buster/tools-deps/entrypoint deleted file mode 100755 index 51561d1d..00000000 --- a/target/openjdk-19-slim-buster/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/openjdk-19-slim-buster/tools-deps/rlwrap.retry b/target/openjdk-19-slim-buster/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbfb..00000000 --- a/target/openjdk-19-slim-buster/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/test/docker_clojure/core_test.clj b/test/docker_clojure/core_test.clj index 71eddd70..648c0b87 100644 --- a/test/docker_clojure/core_test.clj +++ b/test/docker_clojure/core_test.clj @@ -5,94 +5,113 @@ (deftest image-variants-test (testing "generates the expected set of variants" - (with-redefs [default-distro (constantly :debian/slim-buster) + (with-redefs [default-distros {8 :debian-slim/slim-buster + 11 :debian-slim/slim-buster + :default :ubuntu/focal} default-jdk-version 11] - (let [variants (image-variants #{8 11 14 15} - #{:debian/buster :debian/slim-buster :alpine/alpine} + (let [variants (image-variants {8 "openjdk" + 11 "openjdk" + :default "eclipse-temurin"} + #{8 11 17} + {"openjdk" #{:debian/buster + :debian-slim/slim-buster + :alpine/alpine} + :default #{:alpine/alpine :ubuntu/focal}} {"lein" "2.9.1" "boot" "2.8.3" "tools-deps" "1.10.1.478"})] ;; filter is to make failure output a little more humane (are [v] (contains? (->> variants - (filter #(and (= (:jdk-version %) (:jdk-version v)) + (filter #(and (= (:base-image %) (:base-image v)) + (= (:jdk-version %) (:jdk-version v)) (= (:distro %) (:distro v)) (= (:build-tool %) (:build-tool v)))) set) v) - {:jdk-version 11, :distro :debian/slim-buster, :build-tool "lein" - :base-image "openjdk:11-slim-buster" + {:jdk-version 11, :distro :debian-slim/slim-buster, :build-tool "lein" + :base-image "openjdk" :base-image-tag "openjdk:11-slim-buster" :maintainer "Paul Lam & Wes Morgan " :docker-tag "lein-2.9.1", :build-tool-version "2.9.1"} - {:jdk-version 11, :distro :debian/slim-buster, :build-tool "boot" - :base-image "openjdk:11-slim-buster" + {:jdk-version 11, :distro :debian-slim/slim-buster, :build-tool "boot" + :base-image "openjdk" :base-image-tag "openjdk:11-slim-buster" :maintainer "Paul Lam & Wes Morgan " :docker-tag "boot-2.8.3", :build-tool-version "2.8.3"} - {:jdk-version 11, :distro :debian/slim-buster - :base-image "openjdk:11-slim-buster" + {:jdk-version 11, :distro :debian-slim/slim-buster + :base-image "openjdk" + :base-image-tag "openjdk:11-slim-buster" :build-tool "tools-deps" :maintainer "Paul Lam & Wes Morgan " :docker-tag "tools-deps-1.10.1.478" :build-tool-version "1.10.1.478"} {:jdk-version 11, :distro :debian/buster, :build-tool "lein" - :base-image "openjdk:11-buster" + :base-image "openjdk" :base-image-tag "openjdk:11-buster" :maintainer "Paul Lam & Wes Morgan " :docker-tag "lein-2.9.1-buster", :build-tool-version "2.9.1"} {:jdk-version 11, :distro :debian/buster, :build-tool "boot" - :base-image "openjdk:11-buster" + :base-image "openjdk" :base-image-tag "openjdk:11-buster" :maintainer "Paul Lam & Wes Morgan " :docker-tag "boot-2.8.3-buster", :build-tool-version "2.8.3"} {:jdk-version 11, :distro :debian/buster - :base-image "openjdk:11-buster" + :base-image "openjdk" + :base-image-tag "openjdk:11-buster" :build-tool "tools-deps" :maintainer "Paul Lam & Wes Morgan " :docker-tag "tools-deps-1.10.1.478-buster" :build-tool-version "1.10.1.478"} - {:jdk-version 8, :distro :debian/slim-buster, :build-tool "lein" - :base-image "openjdk:8-slim-buster" - :maintainer "Paul Lam & Wes Morgan " - :docker-tag "openjdk-8-lein-2.9.1", :build-tool-version "2.9.1"} - {:jdk-version 8, :distro :debian/slim-buster, :build-tool "boot" - :base-image "openjdk:8-slim-buster" - :maintainer "Paul Lam & Wes Morgan " - :docker-tag "openjdk-8-boot-2.8.3", :build-tool-version "2.8.3"} - {:jdk-version 8, :distro :debian/slim-buster + {:jdk-version 8, :distro :debian-slim/slim-buster, :build-tool "lein" + :base-image "openjdk" + :base-image-tag "openjdk:8-slim-buster" + :maintainer "Paul Lam & Wes Morgan " + :docker-tag "openjdk-8-lein-2.9.1", :build-tool-version "2.9.1"} + {:jdk-version 8, :distro :debian-slim/slim-buster, :build-tool "boot" + :base-image "openjdk" + :base-image-tag "openjdk:8-slim-buster" + :maintainer "Paul Lam & Wes Morgan " + :docker-tag "openjdk-8-boot-2.8.3", :build-tool-version "2.8.3"} + {:jdk-version 8, :distro :debian-slim/slim-buster :build-tool "tools-deps" - :base-image "openjdk:8-slim-buster" + :base-image "openjdk" + :base-image-tag "openjdk:8-slim-buster" :maintainer "Paul Lam & Wes Morgan " :docker-tag "openjdk-8-tools-deps-1.10.1.478" :build-tool-version "1.10.1.478"} - {:jdk-version 14, :distro :debian/slim-buster, :build-tool "lein" - :base-image "openjdk:14-slim-buster" + {:jdk-version 17, :distro :ubuntu/focal, :build-tool "lein" + :base-image "eclipse-temurin" + :base-image-tag "eclipse-temurin:17-jdk-focal" :maintainer "Paul Lam & Wes Morgan " - :docker-tag "openjdk-14-lein-2.9.1" + :docker-tag "temurin-17-lein-2.9.1" :build-tool-version "2.9.1"} - {:jdk-version 15, :distro :alpine/alpine, :build-tool "lein" - :base-image "openjdk:15-alpine" + {:jdk-version 17, :distro :alpine/alpine, :build-tool "lein" + :base-image "eclipse-temurin" + :base-image-tag "eclipse-temurin:17-jdk-alpine" :maintainer "Paul Lam & Wes Morgan " - :docker-tag "openjdk-15-lein-2.9.1-alpine" + :docker-tag "temurin-17-lein-2.9.1-alpine" :build-tool-version "2.9.1"} - {:jdk-version 15, :distro :alpine/alpine, :build-tool "boot" - :base-image "openjdk:15-alpine" + {:jdk-version 17, :distro :alpine/alpine, :build-tool "boot" + :base-image "eclipse-temurin" + :base-image-tag "eclipse-temurin:17-jdk-alpine" :maintainer "Paul Lam & Wes Morgan " - :docker-tag "openjdk-15-boot-2.8.3-alpine" + :docker-tag "temurin-17-boot-2.8.3-alpine" :build-tool-version "2.8.3"} - {:jdk-version 15, :distro :alpine/alpine - :base-image "openjdk:15-alpine" + {:jdk-version 17, :distro :ubuntu/focal + :base-image "eclipse-temurin" + :base-image-tag "eclipse-temurin:17-jdk-focal" :build-tool "tools-deps" :maintainer "Paul Lam & Wes Morgan " - :docker-tag "openjdk-15-tools-deps-1.10.1.478-alpine" + :docker-tag "temurin-17-tools-deps-1.10.1.478" :build-tool-version "1.10.1.478"}))))) (deftest variant-map-test (testing "returns the expected map version of the image variant list" (is (= {:jdk-version 8 - :base-image "openjdk:8-distro" + :base-image "openjdk" + :base-image-tag "openjdk:8-distro" :distro :distro/distro :build-tool "build-tool" :docker-tag "openjdk-8-build-tool-1.2.3-distro" :build-tool-version "1.2.3" :maintainer "Paul Lam & Wes Morgan "} - (variant-map '(8 :distro/distro ["build-tool" "1.2.3"])))))) + (variant-map '("openjdk" 8 :distro/distro ["build-tool" "1.2.3"])))))) (deftest exclude?-test (testing "excludes variant that matches all key-values in any exclusion" @@ -105,17 +124,18 @@ {:base-image "bad", :build-tool "boot"}))))) (deftest docker-tag-test - (with-redefs [default-jdk-version 11 ; TODO: Make this an arg to the fn instead - default-distro (constantly :debian/slim-buster)] ; TODO: Rethink this too? + (with-redefs [default-jdk-version 11 ; TODO: Make this an arg to the fn instead + default-distros {:default :debian-slim/slim-buster}] ; TODO: Rethink this too? (testing "default java version is left out" (is (not (str/includes? (docker-tag {:jdk-version 11}) "openjdk-11")))) (testing "non-default version is added as a prefix" - (is (str/starts-with? (docker-tag {:jdk-version 14}) + (is (str/starts-with? (docker-tag {:base-image "openjdk" + :jdk-version 14}) "openjdk-14"))) (testing "default distro is left out" (is (not (str/includes? (docker-tag {:jdk-version 14 - :distro :debian/slim-buster}) + :distro :debian-slim/slim-buster}) "slim-buster")))) (testing "alpine is added as a suffix" (is (str/ends-with? (docker-tag {:jdk-version 8 diff --git a/test/docker_clojure/dockerfile_test.clj b/test/docker_clojure/dockerfile_test.clj index a7c7bb0e..e672afb6 100644 --- a/test/docker_clojure/dockerfile_test.clj +++ b/test/docker_clojure/dockerfile_test.clj @@ -10,41 +10,42 @@ (deftest build-dir-test (testing "replaces colons with hyphens in tag" (is (= "target/openjdk-11-alpine/lein" - (build-dir {:base-image "openjdk:11-alpine" - :build-tool "lein"}))))) + (build-dir {:base-image-tag "openjdk:11-alpine" + :build-tool "lein"}))))) (deftest contents-test (testing "includes 'FROM base-image'" - (is (str/includes? (contents core/installer-hashes {:base-image "base:foo" - :build-tool "boot" - :jdk-version 11}) + (is (str/includes? (contents core/installer-hashes + {:base-image-tag "base:foo" + :build-tool "boot" + :jdk-version 11}) "FROM base:foo"))) (testing "has no labels (Docker recommends against for base images)" (is (not (str/includes? (contents core/installer-hashes - {:base-image "base:foo" - :build-tool "boot" - :maintainer "Me Myself" - :jdk-version 11}) + {:base-image-tag "base:foo" + :build-tool "boot" + :maintainer "Me Myself" + :jdk-version 11}) "LABEL ")))) (testing "lein variant includes lein-specific contents" (with-redefs [lein/contents (constantly ["leiningen vs. the ants"])] (is (str/includes? (contents core/installer-hashes - {:base-image "base:foo" - :build-tool "lein" - :maintainer "Me Myself"}) + {:base-image-tag "base:foo" + :build-tool "lein" + :maintainer "Me Myself"}) "leiningen vs. the ants")))) (testing "boot variant includes boot-specific contents" (with-redefs [boot/contents (constantly ["Booty McBootface"])] (is (str/includes? (contents core/installer-hashes - {:base-image "base:foo" - :build-tool "boot" - :maintainer "Me Myself"}) + {:base-image-tag "base:foo" + :build-tool "boot" + :maintainer "Me Myself"}) "Booty McBootface")))) (testing "tools-deps variant includes tools-deps-specific contents" (with-redefs [tools-deps/contents (constantly - ["Tools Deps is not a build tool"])] + ["Tools Deps is not a build tool"])] (is (str/includes? (contents core/installer-hashes - {:base-image "base:foo" - :build-tool "tools-deps" - :maintainer "Me Myself"}) + {:base-image-tag "base:foo" + :build-tool "tools-deps" + :maintainer "Me Myself"}) "Tools Deps is not a build tool")))))