-
Notifications
You must be signed in to change notification settings - Fork 34
Update README & re-enable alpine variants for temurin images #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
43dab21
Build alpine variants for Java 17+ again
cap10morgan b0dc131
Add Dockerfiles for Java 17+ alpine variants
cap10morgan 5817166
Refresh the README for openjdk -> temurin migration
cap10morgan b361a41
Fix old mention of Debian slim-bullseye in README
cap10morgan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| FROM eclipse-temurin:17-jdk-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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/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 "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| FROM eclipse-temurin:17-jdk-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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/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 "$@" |
26 changes: 26 additions & 0 deletions
26
target/eclipse-temurin-17-jdk-alpine/tools-deps/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| FROM eclipse-temurin:17-jdk-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"] |
21 changes: 21 additions & 0 deletions
21
target/eclipse-temurin-17-jdk-alpine/tools-deps/entrypoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/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 "$@" |
30 changes: 30 additions & 0 deletions
30
target/eclipse-temurin-17-jdk-alpine/tools-deps/rlwrap.retry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| FROM eclipse-temurin:18-jdk-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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/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 "$@" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean "tools-deps on Eclipse Temurin:"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Good catch!