Fork me on GitHub
#docker
<
2018-10-18
>
nickmbailey18:10:18

do people building docker images for clojure do something to prevent downloading all dependencies on every build?

nickmbailey18:10:39

download common deps into a base image to use periodically?

mpenet18:10:20

.m2 as a volume here

nickmbailey18:10:57

hmm that might solve my private repository issue as well

mpenet18:10:00

That's for dev at least

mpenet18:10:23

Yeah, I had the same concern

nickmbailey18:10:25

for prod you just redownload for each build?

mpenet18:10:54

No we do uberjars

nickmbailey18:10:25

you build the uberjar outside the dockerfile and just copy it in?

nickmbailey18:10:45

or you don't use docker at all you mean?

mpenet18:10:58

We dont run in containers in prod

mpenet18:10:24

If we would I guess copying the uberjar seem like a good solution anyway

nickmbailey18:10:24

yeah i guess i'm building on circleci so i have a consistent build environment, building an uberjar and copying it into a docker image isn't terrible

mpenet18:10:35

Downloading the deps from prod is not good imho, ex you might need priv repo credentials etc

mpenet18:10:58

Sounds good yep

nickmbailey18:10:36

right that's what i'm trying to solve, i was going to just build the uberjar inside the docker file but for some insane reason passing anything sensitive at build time is like impossible in docker and also not redownloading all of .m2 would be nice