diff --git a/src/docker_clojure/config.clj b/src/docker_clojure/config.clj index 74e46fa..715baaa 100644 --- a/src/docker_clojure/config.clj +++ b/src/docker_clojure/config.clj @@ -127,6 +127,9 @@ ;; Only build amd64 & arm64 architectures for alpine {:architecture #(not (#{"amd64" "arm64v8"} %)) :distro :alpine/alpine} + ;; Alpine w/ Java 8 stopped building correctly and not worth the time to fix + {:jdk-version 8 + :distro :alpine/alpine} ;; ppc64le needs Debian Bookworm or newer {:architecture "ppc64le" :distro #(and (-> % namespace (str/starts-with? "debian")) diff --git a/target/eclipse-temurin-8-jdk-alpine/lein/Dockerfile b/target/eclipse-temurin-8-jdk-alpine/lein/Dockerfile deleted file mode 100644 index abb9f2c..0000000 --- a/target/eclipse-temurin-8-jdk-alpine/lein/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM eclipse-temurin:8-jdk-alpine - -ENV LEIN_VERSION=2.12.0 -ENV LEIN_INSTALL=/usr/local/bin/ - -WORKDIR /tmp - -# Download the whole repo as an archive -RUN set -eux; \ -apk add --no-cache ca-certificates bash tar openssl gnupg && \ -mkdir -p $LEIN_INSTALL && \ -wget -q https://codeberg.org/leiningen/leiningen/raw/tag/$LEIN_VERSION/bin/lein-pkg && \ -echo "Comparing lein-pkg checksum ..." && \ -sha256sum lein-pkg && \ -echo "12a9c5e3a2471619ca3d64a7462f920fdf713ae8959eb4fcd6257c23332b5aa4 *lein-pkg" | sha256sum -c - && \ -mv lein-pkg $LEIN_INSTALL/lein && \ -chmod 0755 $LEIN_INSTALL/lein && \ -export GNUPGHOME="$(mktemp -d)" && \ -export FILENAME_EXT=jar && \ -gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys 9D13D9426A0814B3373CF5E3D8A8243577A7859F && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -wget -q https://codeberg.org/leiningen/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -echo "Verifying file PGP signature..." && \ -gpg --batch --verify leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT && \ -gpgconf --kill all && \ -rm -rf "$GNUPGHOME" leiningen-$LEIN_VERSION-standalone.$FILENAME_EXT.asc && \ -mkdir -p /usr/share/java && \ -mkdir -p /root/.lein && \ -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.12.1 so users don't have to download it every time -RUN echo '(defproject dummy "" :dependencies [[org.clojure/clojure "1.12.1"]])' > project.clj \ - && lein deps && rm project.clj - -CMD ["lein", "repl"] diff --git a/target/eclipse-temurin-8-jdk-alpine/lein/entrypoint b/target/eclipse-temurin-8-jdk-alpine/lein/entrypoint deleted file mode 100755 index ccf8cce..0000000 --- a/target/eclipse-temurin-8-jdk-alpine/lein/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=lein - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/eclipse-temurin-8-jdk-alpine/tools-deps/Dockerfile b/target/eclipse-temurin-8-jdk-alpine/tools-deps/Dockerfile deleted file mode 100644 index d87678b..0000000 --- a/target/eclipse-temurin-8-jdk-alpine/tools-deps/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM eclipse-temurin:8-jdk-alpine - -ENV CLOJURE_VERSION=1.12.4.1582 - -WORKDIR /tmp - -RUN \ -apk add --no-cache curl bash make git rlwrap && \ -curl -fsSLO https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh && \ -sha256sum linux-install-$CLOJURE_VERSION.sh && \ -echo "0dc6f211d2a737ce6872feb0aa4d1cbbbe72d02665c684f9ad206b88d2e7f4fb *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 - -CMD ["clj"] diff --git a/target/eclipse-temurin-8-jdk-alpine/tools-deps/entrypoint b/target/eclipse-temurin-8-jdk-alpine/tools-deps/entrypoint deleted file mode 100755 index 51561d1..0000000 --- a/target/eclipse-temurin-8-jdk-alpine/tools-deps/entrypoint +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -eou pipefail - -entrypoint=clj - -cmd=${1:-} - -# check if the first arg starts with a hyphen -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - exec "${entrypoint}" "$@" -fi - -if [[ -n "${cmd}" ]]; then - # see if help for the subcommand is successful - if "${entrypoint}" "${cmd}" --help >/dev/null 2>&1; then - exec "${entrypoint}" "$@" - fi -fi - -exec "$@" diff --git a/target/eclipse-temurin-8-jdk-alpine/tools-deps/rlwrap.retry b/target/eclipse-temurin-8-jdk-alpine/tools-deps/rlwrap.retry deleted file mode 100755 index 83cefbf..0000000 --- a/target/eclipse-temurin-8-jdk-alpine/tools-deps/rlwrap.retry +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# This script works around a Docker bug that prevents rlwrap from starting -# right when a container is first started. It is intended to replace -# /usr/bin/rlwrap and also be named rlwrap but earlier in the PATH -# (e.g. /usr/local/bin). - -max_tries=100 # 100 tries is ~1 second -try=0 - -while true; do - # see if rlwrap can start at all - output=$(/usr/bin/rlwrap true 2>&1 >/dev/null) - exit_code=$? - if [ $exit_code -gt 0 ]; then - # it didn't start - try=$((try+1)) - if [ $try -gt $max_tries ]; then - # we're at max attempts so output the error and exit w/ the same code - echo "$output" >&2 - exit $exit_code - else - # wait a bit and try again - sleep 0.01 - fi - else - # rlwrap can start so let's run it for real - exec /usr/bin/rlwrap "$@" - fi -done