Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine images error on default entrypoint due to missing rlwrap #241

Open
cap10morgan opened this issue Sep 12, 2024 · 2 comments
Open

Alpine images error on default entrypoint due to missing rlwrap #241

cap10morgan opened this issue Sep 12, 2024 · 2 comments

Comments

@cap10morgan
Copy link
Collaborator

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:

  • install rlwrap (kind of heavy for alpine)
  • wait for Replace rlwrap with rlfe #230 to be ready and merged
  • switch to clojure as the entrypoint for alpine images.
@practicalli-johnny
Copy link

Would it make more sense for the default to be a shell prompt

  • clojure and clj provide a minimal repl UI
  • typing clojure code in a minimal repl ui within a docker container prompt seem very limited, especially compared to an editor connected REPL workflow
  • if running a repl process has the most value as the default entry point, then wouldn't it be even more valuable to include an nrepl server yo connect a local rdiyor
  • leiningen and Clojure CLI are both included in the default images, so having a shell (bash) prompt seems to be more appropriate
  • using clojure or clj in tool specific images means there is a different entrypoint and behaviour to the default image (assuming the above point holds true)
  • clojure 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?

@alexander-yakushev
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants