Skip to content

Docker is not a virtual machine #424

@lassipulkkinen

Description

@lassipulkkinen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions