Virtual Machine (VM) versus containers

A container image is a lightweight, standalone, executable package of a piece of software that includes everything needed to run it—code, runtime, system tools, system libraries, and settings.

Containers and VMs have similar resource isolation (maybe you can argue that virtualization provides better isolation) and allocation benefits, but function differently because containers do not include the operating system part (or at least not the kernel part of it) and containers are more light, so potentially more portable and efficient.

Docker's website describes in detail the differences between containers and VMs, starting with the architectural difference:

Containers versus VMs

For more details on containers, ...

Get Mastering VMware vSphere 6.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.