3 ms·
Plenty room for more (concurrent) layers, too! I've only recently embraced using multi-stage build to concurrently split a build in two to four steps * (one o
by mfontani 6y ago
Plenty room for more (concurrent) layers, too!
I've only recently embraced using multi-stage build to concurrently split a build in two to four steps
* (one or more) fetcher, for fetching (say) the source package or cloning a git repo in the proper commit/branch, or having external dependencies whose output could be cached regardless of the rest of the dockerfile contents
* builder, which uses "COPY --from=fetcher" to "bring over" the code or dependencies
* the actual resulting image, which oftentimes could well be a "FROM scratch" and be just comprised of "COPY --from=builder" instructions.
With "docker buildx", or with "DOCKER_BUILDKIT=1 docker build", it's pure joy to use!
- mvip 6y agoAuthor here. Yeah definitely. Hoping to tap into more of these features in the future.
- corytheboyd 6y agoNice, I too had started down this path when looking into using Docker for a new project of mine a few months back. Prior to that I had not really worked with Docker since ~2016 and damn multi-stage builds are a nice improvement. Not to mention how much more mature everything feels.