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
-
prepare 对于加速镜像构建是个有用的特性,可以避免重复下载安装依赖。在实际使用中,至少对于 Python 开发者,会倾向于将开发依赖也加在 prepare 镜像里,以便快速构建出可以运行测试的镜像。
但由于 Python 应用通常是安装完依赖之后就直接部署镜像,即使在
build.script
中只写安装生产依赖,最终构建出来的镜像中也会包含有 prepare 环节安装的开发依赖。这样会导致镜像体积偏大,以及存在安全风险。想讨论下有没有什么好的方法,在保证构建速度的同时,可以规避这个问题。
Beta Was this translation helpful? Give feedback.
All reactions