dockerlinux-containers

Linux Container vs JVM


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?

I assume both are running directly on a physical linux server without underlying visualization.


Solution

  • 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.

    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.

    I found https://docs.docker.com/engine/getstarted/step_one/ and https://docs.docker.com/engine/userguide/eng-image/baseimages/ helpful.