How is Docker different from a Virtual Machine?

Containers have similar resource isolation and allocation benefits as virtual machines but a different architectural approach allows them to be much more portable and efficient. Docker containers run on virtual machines.

With a virtual machine, the server includes the application, all the binaries and libraries and an entire guest operating system which may be massive.

Docker Containers include the application and all of its dependencies, but share the kernel with other containers. They run as an isolated process in userspace on the host operating system. They’re also not tied to any specific infrastructure – Docker containers run on any computer, on any infrastructure and in any cloud.