This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-23
Channels
- # announcements (11)
- # babashka (35)
- # beginners (110)
- # calva (2)
- # cider (46)
- # clara (5)
- # clj-kondo (29)
- # cljdoc (4)
- # cljsrn (59)
- # clojure (163)
- # clojure-brasil (3)
- # clojure-europe (24)
- # clojure-italy (2)
- # clojure-nl (10)
- # clojure-sweden (1)
- # clojure-uk (36)
- # clojurescript (58)
- # conjure (24)
- # cursive (19)
- # data-science (14)
- # datascript (1)
- # datomic (10)
- # docker (3)
- # expound (6)
- # figwheel-main (17)
- # fulcro (16)
- # graalvm (1)
- # leiningen (9)
- # malli (11)
- # off-topic (22)
- # parinfer (1)
- # pathom (1)
- # re-frame (18)
- # reagent (18)
- # reitit (3)
- # ring (3)
- # shadow-cljs (8)
- # spacemacs (3)
- # specter (79)
- # sql (20)
- # tools-deps (25)
- # vim (4)
- # xtdb (8)
Hey! I'm using https://github.com/weavejester/lein-ring uberjar to build my server, using Docker. I'm able to cache some dependencies by calling lein deps
before touching my project files.
Is there a way to do a call similar to lein deps
so that lein ring can cache the dependencies it adds before my own code busts the Docker cache?
what about lein with-profile +ring deps
- that should calculate all the lein-ring classpath before running deps
Thanks for the suggestion!
Running lein with-profile +ring deps
doesn't seem to include all the dependencies, though.
Sending build context to Docker daemon 156.4MB
Step 1/8 : FROM clojure:openjdk-11-lein
---> ba3af885faf6
Step 2/8 : WORKDIR /app
---> Using cache
---> 09f838d2f393
Step 3/8 : ADD project.clj ./
---> d60445fb9b66
Step 4/8 : RUN lein with-profile +ring deps
---> Running in 678edcd00a2b
Retrieving lein-ring/lein-ring/0.12.5/lein-ring-0.12.5.pom from clojars
Retrieving org/clojure/core.unify/0.5.7/core.unify-0.5.7.pom from central
Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
...
Retrieving ring/ring-mock/0.4.0/ring-mock-0.4.0.jar from clojars
Retrieving ring/ring-defaults/0.3.2/ring-defaults-0.3.2.jar from clojars
Removing intermediate container 678edcd00a2b
---> 139216aadc67
Step 5/8 : COPY src/ ./src/
---> a184583a5fa8
Step 6/8 : COPY resources/ ./resources/
---> eae8c20394fe
Step 7/8 : RUN lein ring uberjar
---> Running in 04f1250852ab
Retrieving ring-server/ring-server/0.5.0/ring-server-0.5.0.pom from clojars
Retrieving ring/ring/1.3.2/ring-1.3.2.pom from clojars
Retrieving ring/ring-core/1.3.2/ring-core-1.3.2.pom from clojars
...Hey, did anyone try comparing repl start up time with hotspot jvm vs openj9 jvm?
I downloaded openj9 from https://adoptopenjdk.net/
Openj9 claims faster startup. Not sure how to measure it for clojure