Containers are often associated with virtual machines. But this is not really a valid comparison. Therefore I would like to discuss the differences between these technologies in this blog post.

Container:

Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space. Containers take up less space than VMs (container images are typically tens of MBs in size), can handle more applications and require fewer VMs and Operating systems.

Virtual Machine:

Virtual machines (VMs) are an abstraction of physical hardware turning one server into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, the application, necessary binaries and libraries - taking up tens of GBs. VMs can also be slow to boot.

Source:

What is a Container? | Docker
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. Learn more.

What can we derive from this?

A server can hold significantly more containers than virtual machines, because containers generate significantly less overhead and consume fewer resources. Therefore containers also start faster. ( In contrast to a VM, a complete guest operating system is not necessary to provide a container).

Using a container, applications are relatively independent and therefore much easier to port. Their business use is mainly pushed from the developer's corner.

Under these circumstances DevOps plays a more important role. Companies with a growing share of software need the right framework conditions. For this reason, the traditionally separate areas of development and operations should in future operate as a single unit (DevOps). The goal is to optimize the speed and quality of the app lifecycle of development, testing, deployment and monitoring. In some DevOps concepts, containers are an integral part of the process, as they bring significantly more speed to the process than VMs.

Microservices, which are increasingly replacing monolithically designed applications in favor of easier management and faster release cycles, are also ideally suited for containers. In the same study, one fifth of IT decision-makers stated that they were already working with microservices architectures.

Source: https://jaxenter.de/docker-vs-vm-54816