Open cap10morgan opened 1 month ago
Would it make more sense for the default to be a shell prompt
clojure
and clj
provide a minimal repl UIclojure
and clj
are typically used with aliases during development and there are a range of (for production the most common approach is to use an uberjar with the Java command)There are many options even using clojure or clj as the default, so would using a shell prompt as the default be more flexible and simpler approach for all Clojure images?
I agree with you on most or ever all points. However, the current entrypoint also allows executing Leiningen and tools.deps subcommands, e.g.:
$ docker run --rm -ti clojure:temurin-22-lein-2.11.2-jammy help
Leiningen is a tool for working with Clojure projects.
Several tasks are available:
change Rewrite project.clj with f applied to the value at key-or-path.
check Check syntax and warn on reflection.
classpath Write the classpath of the current project to output-file.
clean Removes all files from paths in clean-targets for a project
compile Compile Clojure source into .class files.
...
Somebody might be reliant on this behavior, so I guess we are kinda stuck with supporting this (if compatibility is a priority). I'm not a fan of this approach either but it is what it is.
We can, theoretically, keep this behavior but change the default command from say lein repl
to bash
if no arguments are provided to the docker run
command. It's just that the entrypoint script is already pretty complicated, I'm not sure if adding more complexity to it is a good thing.
Due to #23
docker run clojure:tools-deps-alpine
=>/usr/local/bin/rlwrap: line 13: /usr/bin/rlwrap: not found
Could do any one of the following:
clojure
as the entrypoint for alpine images.