Fork me on GitHub
#docker
<
2021-09-17
>
cap10morgan16:09:21

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.

mkvlr17:09:41

@cap10morgan sounds good mostly, docker run clojure -M -e '(+ 1 2)' looks even better though. Would it be possible to make that the default?

cap10morgan17:09:26

@mkvlr You mean make clj the ENTRYPOINT in the clojure:latest image instead of lein?

mkvlr17:09:30

feel like itโ€™s a reasonable default these days

cap10morgan17:09:38

yeah... it feels inevitable at some point. I would prefer it, for sure.

๐Ÿ‘ 4
cap10morgan17:09:13

I'll open an issue about it on our GitHub repo and gather some feedback first

mkvlr17:09:28

do you also have babashka in the image?

cap10morgan17:09:38

not currently

mkvlr17:09:51

ok, might also be interesting

cap10morgan17:09:59

I could imagine some babashka variants, at least

cap10morgan17:09:27

I've been working on graalvm native-image variants lately

mkvlr17:09:30

we use bb clojure instead of clojure

cap10morgan17:09:19

what does that get you?

mkvlr17:09:30

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

mkvlr17:09:13

always a bit of a pita with the official clj that folks get a (often crytic) error message when depending on the latest bits

cap10morgan17:09:29

hmm... so babashka could be a tool variant alongside lein, boot (does anyone use that anymore?), and tools-deps

mkvlr17:09:17

yeah, I guess so

mkvlr17:09:38

docker run clojure:bb clojure -M -e '(+ 1 2)' ๐Ÿ˜ผ

cap10morgan17:09:11

yep, exactly ๐Ÿ™‚

cap10morgan17:09:37

feel free to emoji-vote on that ๐Ÿ™‚

๐Ÿ‘ 2
cap10morgan17:09:24

does bb clojure need a JVM? or is it still running everything on native-image SCI?

cap10morgan17:09:39

wondering if babashka images would even need to build FROM openjdk images

mkvlr17:09:05

yes, needs a jvm, just the launcher part is implemented as a babashka script

cap10morgan17:09:21

well that makes things easier for me ๐Ÿ™‚

mkvlr17:09:26

so itโ€™s fast enough to always build it on the fly, no need for -Sforce

๐Ÿ‘ 2
mkvlr17:09:29

think the bb image could just be clojure:tools-deps + https://github.com/babashka/babashka#quickstart

cap10morgan17:09:48

would you want tools.deps pre-installed? just the latest release so you wouldn't have to download it for each new container?

cap10morgan17:09:29

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

mkvlr17:09:44

right, invoking it once would be good

๐Ÿ‘ 2
mkvlr17:09:56

commented on the issue

cap10morgan17:09:52

it's a cool idea. I hadn't realized babashka could do that

mkvlr17:09:52

babashka tasks is nice & worth checking out

๐Ÿ‘ 2