Linux容器与JVM [英] Linux Container vs JVM
问题描述
在Docker顶部运行的容器和运行在JVM之上的独立Java程序之间有什么大的区别?
What's the big difference between a container running on top of docker and a self contained Java program running on top of the JVM?
我假设两者都直接运行一个没有底层可视化的物理linux服务器。
I assume both are running directly on a physical linux server without underlying visualization.
推荐答案
运行在JVM之上的一个java程序将是一个单一的Linux进程。 JVM运行在进程中,并解释(或编译)类中的Java字节代码。
A java program running on top of the JVM will be a single Linux process. The JVM runs inside the process, and interprets (or compiles) the Java byte code in your classes.
码头容器的重量更大。有Docker守护程序,Docker容器,其实际上是一个虚拟化的Linux实例,然后你的JVM运行在这个。
A docker container is more heavyweight. There's the docker daemon, the docker container, which is actually a virtualized Linux instance, and then your JVM running under that.
我发现 https://docs.docker.com/engine/getstarted/step_one/ 和 https://docs.docker.com/engine/userguide/eng-image/baseimages/ 有帮助。
这篇关于Linux容器与JVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!