When Would We Use a Container Over a Virtual Machine or a Process?

This is a valid question, especially considering the fact many companies have heavily invested in virtualized environments on premises and in the cloud. Hypervisor virtualization technologies have proven to be secure and compatible, and we could even look at a virtual machine as an encapsulated, individually deployable component.

The answer to this question really lies in the scenario. Not every scenario should, or even can be, solved with containers, so it is important to understand where containers are a good choice over virtual machines.

Let’s have a closer look at a scenario that enables us to compare virtual machines and containers.

Consider a cloud service that needs to ...

Get Microservices with Docker on Microsoft Azure™ (includes Content Update Program) 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.