TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Smaller Docker Images Using Multi-Stage Builds

20 pointsby gschierover 4 years ago

2 comments

danieldiazasover 4 years ago
Am i missing something or we are talking about a feature that's been around for 2 years now? On my side, i've been using this kind of builds for NET Core for quite that time. I think i'm really missing something...
评论 #24807170 未加载
jkachmarover 4 years 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].<p>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].<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;jkachmar&#x2F;alpine-haskell-stack&#x2F;blob&#x2F;master&#x2F;Makefile#L54:L58" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jkachmar&#x2F;alpine-haskell-stack&#x2F;blob&#x2F;master...</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;docker&#x2F;cli&#x2F;issues&#x2F;1134" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;docker&#x2F;cli&#x2F;issues&#x2F;1134</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;moby&#x2F;moby&#x2F;pull&#x2F;37151" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;moby&#x2F;moby&#x2F;pull&#x2F;37151</a>