Docker is based on concept of process isolation and is designed so each container can run a single process (containers can run more than one process). Many Docker experts will tell you it’s nothing like a virtual machine (VM) and they’ll describe how the architecture differs because it doesn’t use a hypervisor and doesn’t install a completely new operating system. They might even reference an image like this:
These people are definitely right, but in a practical sense the two behave very similarly. When our team was first incorporating container technology into our workflow, we decided to start by using Docker for local development. For all intents and purposes, Docker functioned like an extremely light VM. A huge advantage we saw right away is we could start up an existing Docker container in a few seconds, while using Virtual Box and Vagrant often took over a minute. We also discovered that we could run more containers simultaneously without tapping out the resources on our laptops.