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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
docker image的size与日俱增,现在已经来到1.54GB (1.9.6)了,我看了一下Dockerfile感觉可以做优化的地方还是有一些的,譬如apt所安装的大部分lib都只是用来build image的,build完毕的content完全可以重新再copy到一个新的base imgae中。
不过非常理解作者用爱发电,难以顾全这些细枝末节的事情。建议可以尝试slimtoolkit来自动优化image。
项目地址:https://github.com/slimtoolkit/slim
看介绍使用非常简单,调用
slim build <image>
就可以了。优化的结果也还算可以,我个人测试是1.54GB to 759MB。Beta Was this translation helpful? Give feedback.
All reactions