You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
InfoQ的一篇文章,谈为什么不要把大型JAR包放进Docker镜像,以及应该如何正确的构建基于java的docker镜像。
原则就是利用docker镜像的分层机制,每次分发时只更新程序的变更, 而不是将整个JRE都全部更新一遍。
一个java程序,主要是由依赖项, 资源文件, 代码组成,这三项的占用空间的比例如下:
没有必要每次代码的提交都把所有的依赖项,资源文件, 代码全部打包成一个新的docker镜像。
最好的实现是合理的对镜像进行分层:
最后提到了google的Jib插件,它会为你处理好镜像分层的工作。
原文: https://www.infoq.cn/article/eULlQ4A3RcaLLQeImQy9
The text was updated successfully, but these errors were encountered: