boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 180 forks source link

Windows 10 host + docker alpine container - not able to connect to nrepl #580

Closed ignorabilis closed 7 years ago

ignorabilis commented 7 years ago

Hi,

I have a Windows 10 host with IntelliJ + Cursive. I have an Alpine Docker container with boot and my project. I am starting a dev environment in the container and the container is up, with the ports binded (netstat -an on the host shows them listening after container start). When I try to connect to the nrepl via Cursive I am getting this exception:

Exception starting REPL: java.net.SocketException: The transport's socket appears to have lost its connection to the nREPL server

Running boot directly on the host Win 10 and then connecting through Cursive & nrepl works just fine.

On an Ubuntu machine where both the app and Cursive are on the host things are working just fine too and I am able to connect to the nrepl.

The production app in the Alpine container is working just fine too.

I'm not sure this is an issue with boot or that is an actual issue at all - I just have a similar project with Cursive on Win 10, Leiningen and an Ubuntu container and everything works fine.

Any insights are appreciated. Thanks in advance.

PS: Forgot to add my dev task: (deftask app-dev [] (comp (environ :env {:is-dev "true" :http-port "80"}) (watch) (reload) (cljs-repl :nrepl-opts {:port 10001}) (cljs :source-map true) (repl :server true :port 10000)))

ignorabilis commented 7 years ago

Ok, I'm closing this - I have forgotten to add :bind "0.0.0.0" so that the app is not on the loopback interface. The dev task looks like this:

(deftask app-dev [] (comp (environ :env {:is-dev "true" :http-port "80"}) (watch) (reload) (cljs-repl :nrepl-opts {:bind "0.0.0.0" :port 10001}) (cljs :source-map true) (repl :server true :bind "0.0.0.0" :port 10000)))