mix_docker icon indicating copy to clipboard operation
mix_docker copied to clipboard

Allow deps folder to be copied over to improve build time

Open tlvenn opened this issue 7 years ago • 2 comments

Right now, the deps folder is in the .dockerignore and therefore not being copied over to the build image which means that all deps are retrieved from scratch.

I don't see any reason to prevent them from being copied over as it will speed up the build time significantly if this step (fetching deps) can be bypassed because the deps folder in the docker image has been warmed already.

For example, in my CI server, I run mix deps.get && mix test as a step before running mix docker.shipit. By removing the deps folder from .dockerignore, i cut the build time in half.

tlvenn avatar Apr 18 '17 04:04 tlvenn

@teamon any comment on this ? Any idea why you initially decided to dockerignore it ?

tlvenn avatar Apr 24 '17 02:04 tlvenn

You would have to make sure your deps are prod deps and not dev deps as well.

joshuataylor avatar May 11 '17 13:05 joshuataylor