This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-12
Channels
- # announcements (2)
- # architecture (1)
- # aws (22)
- # babashka (2)
- # beginners (39)
- # bristol-clojurians (2)
- # cider (1)
- # clj-kondo (12)
- # cljfx (75)
- # cljs-dev (16)
- # clojure (51)
- # clojure-berlin (1)
- # clojure-france (4)
- # clojure-nl (2)
- # clojure-norway (36)
- # clojurescript (5)
- # community-development (8)
- # data-science (1)
- # datomic (4)
- # emacs (4)
- # fulcro (7)
- # jobs-discuss (7)
- # juxt (1)
- # nrepl (3)
- # off-topic (38)
- # reitit (1)
- # ring (7)
- # sci (79)
- # shadow-cljs (5)
- # sql (15)
- # tools-deps (22)
- # uncomplicate (7)
- # vrac (1)
- # xtdb (18)
Hello! I am trying to run nrepl inside Docker for a VSCode remote dev container. The Dockerfile ends up with CMD ["clojure", "-A:nrepl", "--bind", "0.0.0.0"]
and the port is defined in deps.edn
and exposed and I can connect to it with telnet. But when I connect with a nrepl client, I never get to the prompt, it just freezes:
đ clj -A:nrepl --connect --host me --port 52162 [*master]
nREPL 0.8.0-alpha5
Clojure 1.10.1
OpenJDK 64-Bit Server VM 11.0.1+13
Interrupt: Control+C
Exit: Control+D or (exit) or (quit)
What could it mean? How to troubleshoot? In deps.edn I have
:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.8.0-alpha5"}}
:main-opts ["-m" "nrepl.cmdline" "--port" "52162"]}
BTW sometimes it works as it should... So I guess it is some kind of a timing issue.
I donât know what the issue is, but I also worked on making a Docker image for running an nREPL server a while back, and ended up with this:
FROM clojure:openjdk-16-tools-deps-alpine
ENV NREPL_VERSION 0.8.0
ENTRYPOINT clojure -Sdeps "{:deps {nrepl/nrepl {:mvn/version \"$NREPL_VERSION\"}}}" --main nrepl.cmdline --bind 0.0.0.0 --port 1234
ADD healthcheck.clj .
HEALTHCHECK --interval=5s --timeout=30s --start-period=5s --retries=5 CMD clojure healthcheck.clj
EXPOSE 1234/tcp
Where healthcheck.clj
looks like this:
(import '( Socket))
(Socket. "localhost" 1234)
Not that the health check is necessary in your case.
Anyway, it seems to work â at least I havenât encountered the issue you describe. FWIW. đđ 3