Share executable between docker images

2019-08-26 01:09发布

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条回答
乱世女痞
2楼-- · 2019-08-26 01:42

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.

查看更多
登录 后发表回答