docker

cap10morgan 2021-09-17T16:24:21.010Z

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.

mkvlr 2021-09-17T17:04:41.010800Z

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

cap10morgan 2021-09-17T17:05:26.011500Z

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

mkvlr 2021-09-17T17:06:07.012500Z

yes

mkvlr 2021-09-17T17:06:30.013300Z

feel like it’s a reasonable default these days

cap10morgan 2021-09-17T17:06:38.013500Z

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

πŸ‘ 2
cap10morgan 2021-09-17T17:07:13.014300Z

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

mkvlr 2021-09-17T17:07:17.014600Z

cool

mkvlr 2021-09-17T17:07:28.015Z

do you also have babashka in the image?

cap10morgan 2021-09-17T17:07:38.015300Z

not currently

mkvlr 2021-09-17T17:07:51.015800Z

ok, might also be interesting

cap10morgan 2021-09-17T17:07:59.016300Z

I could imagine some babashka variants, at least

cap10morgan 2021-09-17T17:08:27.017Z

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

mkvlr 2021-09-17T17:08:30.017200Z

we use bb clojure instead of clojure

cap10morgan 2021-09-17T17:09:19.017900Z

what does that get you?

mkvlr 2021-09-17T17:09:55.018300Z

this is using https://github.com/borkdude/deps.clj

mkvlr 2021-09-17T17:11:30.020300Z

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

mkvlr 2021-09-17T17:12:13.021500Z

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

cap10morgan 2021-09-17T17:12:29.021800Z

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

mkvlr 2021-09-17T17:13:17.022Z

yeah, I guess so

mkvlr 2021-09-17T17:13:38.022400Z

docker run clojure:bb clojure -M -e '(+ 1 2)' 😼

mkvlr 2021-09-17T17:13:50.022600Z

cc @borkdude

cap10morgan 2021-09-17T17:14:11.023Z

yep, exactly πŸ™‚

cap10morgan 2021-09-17T17:14:24.023400Z

s/lein/clj/ proposal: https://github.com/Quantisan/docker-clojure/issues/128

cap10morgan 2021-09-17T17:14:37.023800Z

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

πŸ‘ 1
cap10morgan 2021-09-17T17:16:24.024600Z

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

cap10morgan 2021-09-17T17:16:39.025300Z

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

mkvlr 2021-09-17T17:17:05.025700Z

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

cap10morgan 2021-09-17T17:17:11.026100Z

ok

cap10morgan 2021-09-17T17:17:21.026600Z

well that makes things easier for me πŸ™‚

mkvlr 2021-09-17T17:17:26.026800Z

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

πŸ‘ 1
mkvlr 2021-09-17T17:18:29.027400Z

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

cap10morgan 2021-09-17T17:20:48.028100Z

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

cap10morgan 2021-09-17T17:22:29.028900Z

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

cap10morgan 2021-09-17T17:24:38.029700Z

proposal issue for this: https://github.com/Quantisan/docker-clojure/issues/129

mkvlr 2021-09-17T17:24:44.030100Z

right, invoking it once would be good

πŸ‘ 1
mkvlr 2021-09-17T17:27:56.030500Z

commented on the issue

cap10morgan 2021-09-17T17:28:31.030700Z

thanks!

cap10morgan 2021-09-17T17:28:52.031100Z

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

mkvlr 2021-09-17T17:35:52.031900Z

babashka tasks is nice & worth checking out

πŸ‘ 1