3 ms·
Depending on how complex or time consuming some of these intermediate stages can be, it can be helpful to explicitly cache from them during the build process [0
by jkachmar 6y ago
Depending on how complex or time consuming some of these intermediate stages can be, it can be helpful to explicitly cache from them during the build process [0].
If you opt-in to using the experimental BuildKit support that Docker has, you can also do some neat tricks like potentially skipping unused layers [1], as well as building layers in parallel based on their dependency hierarchy [2].
[0] https://github.com/jkachmar/alpine-haskell-stack/blob/master/Makefile#L54:L58 https://github.com/jkachmar/alpine-haskell-stack/blob/master...
[1] https://github.com/docker/cli/issues/1134 https://github.com/docker/cli/issues/1134
[2] https://github.com/moby/moby/pull/37151 https://github.com/moby/moby/pull/37151