I'm moving forward with the above proposal, but only for openjdk-16+ images. openjdk-17 is a new LTS release, so that will soon become our new default for those tags that don't specify a version. This way most images will get this functionality but we won't break any existing environments using an explicit tag for openjdk-11 or lower. The PR for all that is still awaiting reviewing at https://github.com/Quantisan/docker-clojure.
@cap10morgan sounds good mostly, docker run clojure -M -e '(+ 1 2)' looks even better though. Would it be possible to make that the default?
@mkvlr You mean make clj the ENTRYPOINT in the clojure:latest image instead of lein?
yes
feel like itβs a reasonable default these days
yeah... it feels inevitable at some point. I would prefer it, for sure.
I'll open an issue about it on our GitHub repo and gather some feedback first
cool
do you also have babashka in the image?
not currently
ok, might also be interesting
I could imagine some babashka variants, at least
I've been working on graalvm native-image variants lately
we use bb clojure instead of clojure
what does that get you?
this is using https://github.com/borkdude/deps.clj
and we start our dev env via a babashka task that uses this, so folks can run bb dev to start it. Whatβs nice is that babashka tasks allow specifying a minimal version so this makes it easy to depend on the lastest features e.g. the recent change regarding :git/sha instead of :sha
always a bit of a pita with the official clj that folks get a (often crytic) error message when depending on the latest bits
hmm... so babashka could be a tool variant alongside lein, boot (does anyone use that anymore?), and tools-deps
yeah, I guess so
docker run clojure:bb clojure -M -e '(+ 1 2)' πΌ
cc @borkdude
yep, exactly π
s/lein/clj/ proposal: https://github.com/Quantisan/docker-clojure/issues/128
feel free to emoji-vote on that π
does bb clojure need a JVM? or is it still running everything on native-image SCI?
wondering if babashka images would even need to build FROM openjdk images
yes, needs a jvm, just the launcher part is implemented as a babashka script
ok
well that makes things easier for me π
so itβs fast enough to always build it on the fly, no need for -Sforce
think the bb image could just be clojure:tools-deps + https://github.com/babashka/babashka#quickstart
would you want tools.deps pre-installed? just the latest release so you wouldn't have to download it for each new container?
when I ran bb clojure locally it still had to download a jar to ~/.deps.clj (even though I already had that version of the cli tools installed) but maybe we could copy / symlink that ahead of time in the image
proposal issue for this: https://github.com/Quantisan/docker-clojure/issues/129
right, invoking it once would be good
commented on the issue
thanks!
it's a cool idea. I hadn't realized babashka could do that
babashka tasks is nice & worth checking out