mix_docker
mix_docker copied to clipboard
Allow deps folder to be copied over to improve build time
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.
@teamon any comment on this ? Any idea why you initially decided to dockerignore it ?
You would have to make sure your deps are prod deps and not dev deps as well.