Share executable between docker images

谁说胖子不能爱 提交于 2019-12-11 16:46:43

问题


Maybe it is really lame question, but would it be possible to share some executables to all docker containers at once?

The reason is i.e. JDK part of the image is pretty big, why not put the binaries in some volume and then just execute java command from there?

Is it feasible at all or nonsense from the start?


回答1:


The reason is i.e. JDK part of the image is pretty big, why not put the binaries in some volume and then just execute java command from there?

Docker images should be portable, and you should be able to start your image anywhere where Docker is installed. If you don't package all the dependencies inside the image, the image will not be portable on any machine.



来源:https://stackoverflow.com/questions/48201096/share-executable-between-docker-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!