A few things have changed recently with the official Clojure Docker images:
- We now have Debian 11 (bullseye) based images, and those are now the default for any tags where you don’t specify the distro you want (you should do that in production, though). You can specify “bullseye” or “slim-bullseye” in the same place in the tags where you could put “buster” or “slim-buster” before. The buster and slim-buster images are still available and will receive regular updates for the time being.
- We published an Alpine Linux based image for JDK 18 EA. But I wouldn’t use it. The upstream image will almost certainly get removed when JDK 18 gets released (as all other recent releases have done). Does anyone still use these? Let me know because I’m strongly considering removing these altogether.
- git is now installed in the slim tools-deps images so that git deps will work in those. Tools-deps use to use a git library for that, but started shelling out to git at some point in the not-too-distant past (at least I hope it’s not too distant 😂). Thanks to @ieugen on GitHub for bringing this to our attention!
And finally a potentially breaking change I’m considering:
For awhile now our images have used
boot repl, and
clj (which defaults to
clj --repl) as their CMDs and no ENTRYPOINTs.
Meaning if you provide your own command on a docker run, that will become the whole enchilada. E.g.
docker run -ti clojure bash gets you a bash prompt inside our image. that's useful sometimes.
But these are clojure images, after all, and it would be kind of nice if you could do things like this:
- “docker run clojure:tools-deps -M -e '(+ 1 2)'” and have it print “3”
- “docker run clojure:lein version” and have it print “Leiningen 2.9.6 on Java 11.0.12 OpenJDK 64-Bit Server VM”
The change needed to do this is to put lein, boot, and clj into the ENTRYPOINTs and change the CMDs to repl, repl, and -M --repl (respectively). So then you override just the CMD w/ whatever trails your docker run invocation, but you can still get a bash prompt with docker run -ti --entrypoint bash clojure.
Thoughts? 👍 / 👎?
OK that’s all for now! May the lambda be with you!
"Small acts of humanity amid the chaos of inhumanity provide hope. But small acts are insufficient."
- Paul Rusesabagina, Rwandan and former hotel manager whose actions inspired the movie Hotel Rwanda