Fork me on GitHub
#leiningen
<
2017-03-15
>
timothypratley02:03:27

when I invoke lein inside a docker container, it just freezes with no output... even lein clean just hangs... anything I can do to diagnose further?

xiongtx04:03:48

I.e. drop into the container and run lein manually

timothypratley04:03:43

yup... I can run java/clojure fine that way, but invoking lein just hangs

timothypratley04:03:54

I guess it's trying to do something it cant do hehehehe

timothypratley04:03:14

root@fa6833805452:/src# java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-1~bpo8+1-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

timothypratley04:03:37

root@fa6833805452:/src# java -classpath ~/.lein/self-installs/leiningen-2.7.1-standalone.jar clojure.main
Clojure 1.8.0
user=> 

timothypratley04:03:20

it's something project specific, because lein --version does work in a different directory (without the project.clj)

timothypratley04:03:58

root@fa6833805452:/# lein --version
Leiningen 2.7.1 on Java 1.8.0_121 OpenJDK 64-Bit Server VM

timothypratley04:03:41

aha, it doesn't like my plugins 😞

timothypratley04:03:02

commenting them out resolves it:

#_#_ :plugins [[lein-ring "0.9.6"]
            [lein-maven-s3-wagon "0.2.5"]]

timothypratley04:03:34

not sure why it hates them.

xiongtx04:03:15

Is it able to download anything from inside the container?

timothypratley04:03:41

I can curl internet pages, but lein still can't run or compile anything, just print the version now 🙂

xiongtx05:03:12

What about other commands, e.g. lein deps?

timothypratley14:03:20

yup lein deps still freezes. I'm sure it is something about my container setup, but no obvious clues what yet.

devth20:03:26

this deploy-repositories config in project.clj appears to work:

:deploy-repositories [["releases" {:url ""
                                     :username [:gpg :env/nexus_user]
                                     :password [:gpg :env/nexus_pass]}]
                        ["snapshots" {:url ""
                                     :username [:gpg :env/nexus_user]
                                     :password [:gpg :env/nexus_pass]}]]
but it gives warnings on any lein task:
([:gpg :env/nexus_pass] and :gpg have a type mismatch merging profiles.)
([:gpg :env/nexus_user] and :gpg have a type mismatch merging profiles.)
([:gpg :env/nexus_pass] and :gpg have a type mismatch merging profiles.)
([:gpg :env/nexus_user] and :gpg have a type mismatch merging profiles.)
any way to avoid this? am i using deploy-repositories incorrectly?

devth20:03:57

seems we need a way to separate 3 concerns: 1. specify auth to a maven repository 2. url to retrieve releases and snapshots to 3. urls to deploy releases and snapshots to not seeing a way to do that but maybe i'm missing something.