Docker does not use LXC (not with Docker 0.9 ), but libcontainer (now runc ), a built-in runtime driver that manages namespaces, control groups, features, apparmor profiles, network interfaces, and firewall rules - everything is consistent and predictable and independent of LXC or any other userland package.
The docker image is a set of files that the winch will run as a container in its own memory, as well as on disk and user space when accessing the host kernel.
This is different from a virtual machine that does not access the host core, but includes its own hardware / software stack through hypervisor .
The container should only set limits (disk, memory, processor) in the host. A virtual machine must create a whole new host.
This docker image (group of files) can be anything if:
This means that the image can be anything: another linux distribution or even one executable file. For example, any executable compilation in go ( https://golang.org/ ) can be packed into its own docker image without any linux distribution:
FROM scratch COPY my_go_exe / ENTRYPOINT /my_go_exe
scratch is an "empty" image, and the go executable is statically linked, so it is autonomous and depends only on kernel system calls.
source share