What is a container?
A container is a unit of software that is executable packaged with application code and all its dependencies. These software programs give virtual isolation for an application, to run on an operating system. This allows the application to be run seamlessly in any environment.
Container Runtime with Docker
Docker is one of the popular container runtime environments, which can run on most common operating systems like Linux, Windows, and even cloud-based Infrastructures. Some other container environments are,
- CoreOS rkt
- Mesos Containers
- LXC Linux Containers
Virtual Machines vs. Docker Containers
Virtual machines provide isolation on hardware and Containers provide isolation on the operating systems. A virtual machine is an abstraction of the physical server enabling multiple instances of the underlying hardware. Container is a packaged layer of application code and dependencies packaged together sharing the OS with other containers. Containers are much lighter compared to virtual machines.
Docker containers are not limited to Linux anymore!
Docker Container popularity in the Linux world leveraging primitive concepts like cgroups and namespaces also got introduced into the Windows Server world. Docker is widely supported in all the leading Cloud providers and is adopted in serverless frameworks.
Introduction of Containers brought evolution into application development and hosting applications. Containers and virtual machines can work together to provide great flexibility. Compared to a virtual machine environment to host an application, a container environment can host the same application in multiples with the same underlying hardware.