Fork me on GitHub
#docker
<
2021-09-10
>
cap10morgan16:09:18

Hey everyone, I'm considering a potentially breaking change to the official clojure docker images and wanted to get everyone's feedback on it first: For awhile now our images have used lein repl, 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?

dharrigan16:09:56

I think it's a great idea. šŸ˜„

šŸ‘ 6