Language and Page Formatting Options
7.3. Comparison with Virtual Machines
Virtual machines represent an entire server with all of the associated software and maintenance concerns. Docker containers provide application isolation and can be configured with minimum run-time environments. In a Docker container, the kernel and parts of the operating system infrastructure are shared. For the virtual machine, a full operating system must be included.
- You can create or destroy containers quickly and easily. Virtual Machines require full installations and require more computing resources to execute.
- Containers are lightweight, therefore, more containers than virtual machines can run simultaneously on a host machine.
- Containers share resources efficiently. Virtual machines are isolated. Therefore multiple variations of an application running in containers are also able to be very lightweight. For example, shared binaries are not duplicated on the system.
- Virtual machines can be migrated while still executing, however containers cannot be migrated while executing and must be stopped before moving from host machine to host machine.
Containers do not replace virtual machines for all use cases. Careful evaluation is still required to determine what is best for your application.
To quickly get up-and-running with Docker Containers, refer to Get Started with Docker Containers.
The Docker FAQ contains more information about Linux Containers, Docker, subscriptions and support.