ev3dev.github.io icon indicating copy to clipboard operation
ev3dev.github.io copied to clipboard

Docker is not a virtual machine

Open lassipulkkinen opened this issue 5 years ago • 1 comments

The "Using Docker to cross-compile" tutorial claims the following:

Docker is a light-weight virtual machine with excellent cross-platform support.

From https://en.wikipedia.org/wiki/Docker_(software):

Docker is a set of platform as a service (PaaS) products that uses OS-level virtualization to deliver software in packages called containers. [...] All containers are run by a single operating system kernel and therefore use fewer resources than virtual machines.

This makes a comparison to virtual machines, therefore Docker itself is not a virtual machine.

The virtual machine used in the tutorial is QEMU:

Also, you will need to install qemu-user-static on your host computer, otherwise you will get an error: exec user process caused "exec format error".

qemu-user-static enables seamless execution of binaries compiled for architectures other than that of the host system. This is achieved using the binfmt-misc feature of the Linux kernel, which affects the entire system, including Docker containers. None of this is specific to Docker in any way; Docker is only used to isolate the build environment.

lassipulkkinen avatar May 23 '20 09:05 lassipulkkinen

Yes, but docker is comparable to a vm, and the actual explanation isn’t really needed in this context.

Project516 avatar Sep 09 '25 13:09 Project516