What is Docker and how is a container different from a virtual machine?
Docker packages an application and its dependencies into an image that runs as an isolated container. Containers share the host operating system kernel and isolate processes with namespaces and cgroups, so they start in seconds and are lightweight. Virtual machines virtualise hardware and run a full guest OS, giving stronger isolation at a higher resource cost.