This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-12
Channels
- # aleph (1)
- # announcements (13)
- # asami (4)
- # babashka (47)
- # beginners (22)
- # calva (11)
- # circleci (1)
- # clj-kondo (14)
- # clojure (43)
- # clojure-europe (43)
- # clojure-gamedev (1)
- # clojure-nl (1)
- # clojure-uk (6)
- # clojurescript (13)
- # core-async (5)
- # cursive (8)
- # datomic (20)
- # events (3)
- # fulcro (12)
- # graalvm (1)
- # graphql (4)
- # gratitude (3)
- # java (2)
- # juxt (2)
- # leiningen (12)
- # off-topic (30)
- # pathom (33)
- # pedestal (5)
- # podcasts (1)
- # polylith (14)
- # rdf (2)
- # re-frame (12)
- # reagent (3)
- # releases (2)
- # shadow-cljs (24)
- # spacemacs (13)
- # sql (2)
- # tools-build (16)
Why when I run lein inside a dockerfile it does not fetch the dependencies?
{:exit 1, :out "Error encountered performing task 'run' with profile(s): 'base,system,user,provided,dev,test'\n", :err "Retrieving jonase/eastwood/0.7.1/eastwood-0.7.1.pom from clojars\nRetrieving org/clojars/brenton/google-diff-match-patch/0.1/google-diff-match-patch-0.1.pom from clojars\nRetrieving org/ow2/asm/asm-all/5.2/asm-all-5.2.pom from central\nRetrieving org/ow2/asm/asm-parent/5.2/asm-parent-5.2.pom from central\nRetrieving org/ow2/ow2/1.3/ow2-1.3.pom from central\nRetrieving lein-shadow/lein-shadow/0.3.1/lein-shadow-0.3.1.pom ,,,,,
this was a problem of r/w permissions on dockerfile.
like this?
java.io.FileNotFoundException: /app/target/classes/META-INF/maven/my-package/my-package/pom.properties (Read-only file system) at java.base/java.io.FileOutputStream.open0(Native Method)
it's breaking on this error
How does your Dockerfile look? It seems like it's using the .m2 in the system or something like that, and that may be read only "(Read-only file system)" which makes it impossible for lein to save the dependencies.
Can I override some setting from project.clj via command line?
Specifically, I want to run lein eftest
with :eftest {:multithread? true}
while project.clj contains :eftest {:multithread? false}
this was a problem of r/w permissions on dockerfile.
how can I build a cache for leiningen deps on a docker container?
What's worked best for me is building an "uberjar" containing all my deps outside docker, then putting that jar inside the container once it is constructed.
This leads to better start up time, and reduced RAM usage, and you can use that ubarjar to eg. start a repl or a secondary entry point by using the -cp
arg to java to specify the jar as the classpath, then using clojure.main
as entrypoint, pointing it to the namespace you want to run.
