Open ieugen opened 3 years ago
Sure, we could use some more docs around this. However, there's nothing particularly special about Docker here. The local maven repo is in $HOME/.m2/repository
like anywhere else.
And otherwise most of this involves adding in your project.clj
, deps.edn
, or build.boot
(or whatever, I'm not a boot user) file first, installing deps, and then adding in the rest of your code / JAR / whatever so that you only break the deps cache when the file that defines what they are changes. That's pretty common across Docker usage w/ lang-specific dependency managers.
But I've been meaning to re-organize the docs anyway, so I can add a section that spells this all out in there when I do.
https://practical.li/blog/posts/build-and-run-clojure-with-multistage-dockerfile/ article covers using the Offical Clojure Docker image for building Clojure and leveraging the docker cache
Feel free to link or use the content (creative commons attribution license)
Thank you.
Hello,
When building Clojure apps a lot of artifacts get downloaded. These can be cached between re-runs for people where this makes sense.
This should improve image build speed - esp in CI servers.
I think more people would use this feature if they new they could and knew where the artifacts are stored in the image so they can mount volumes there.
WDYT? Eugen