多阶段的Docker设置,主要用于从源构建CPP依赖项

发布于 2025-01-20 08:19:12 字数 213 浏览 3 评论 0原文

我目前正在努力提出一个最佳的Dockerfile结构,该结构使我可以在其中一个基本映像中构建所有CPP依赖项(因为它们很少更新),然后更频繁地更新APT套件,以及在构建的图像中更新的图像从基地。我似乎无法制作一个多阶段的Dockerfile,即跑步时,就会意识到基本图像没有更改,因此它使用了我的PC/DockerHub上的PC上的一个,然后继续重建下一个具有一些更改的图像。关于我的设置的外观有什么建议吗?谢谢

I am currently struggeling to come up with an optimal dockerfile structure that lets me do the building of all my cpp dependencies in one of the base images(because they are rarely updated) and then have more frequently updated apt packages and such in images that build from base. I cannot seem to make a multi staged dockerfile that when ran, recognizes that the base image has no changes so it uses the one already on my pc/pulls from dockerhub and then proceeds to rebuild the next images that have some changes. Any advice on how my setupo should look like? thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文