在Docker映像之间共享可执行文件 [英] Share executable between docker images

查看:85
本文介绍了在Docker映像之间共享可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许这确实是一个me脚的问题,但是是否可以一次将所有可执行文件共享给所有Docker容器?

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

原因是图像的JDK部分

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?

相当大,为什么不将二进制文件放到某个量然后从那里执行java命令呢?

Is it feasible at all or nonsense from the start?

推荐答案


原因是图像的JDK部分很大,为什么不将二进制文件放入一定的体积然后只需从那里执行Java命令?

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映像应该是可移植的,并且您应该能够在Docker所在的任何地方启动映像已安装。如果您未将所有依赖项打包到映像中,则映像
将无法在任何计算机上移植。

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.

这篇关于在Docker映像之间共享可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆