Containers are not a new idea. They have been around for many years in the Solaris, FreeBSD, and Unix operating systems as Solaris Zones, Jails, and Chroot , respectively. In the compute space, we have already experienced a lot of innovations that raise the technical maturity bar while abstracting the underlying complexity. We started with bare-metal servers, moved onto virtual machines for hardware-level virtualization, started using containers for software virtualization, and now have serverless technologies that abstract all of it away from the end user. However, in comparison to serverless technologies, containers are still heavily used due to the balance of maturity and control that they offer. This is often an important requirement for enterprise-scale adoption and usage.
Just like how Java and Python prevent us from having to write assembly-level code, containers abstract a lot of operating system internals to offer benefits such as resource isolation and security boundaries, which ultimately lead to improved agility. Unlike virtual machines, containers are a form of operating system virtualization. They are standard units of software that encapsulate the code, and all of its dependencies, so that the application can be executed reliably, and quickly, on multiple environments.
Docker is an open source container platform that has revolutionized the concept of containers. It offers yet another layer of abstraction and constructs that have now shaped the industry norms when it comes to containerized tooling, applications, and platforms. Let’s discuss the key benefits you get with Docker and the underlying constructs it uses.
Docker as a container platform
Docker is a portable runtime application environment that allows us to run an application bundled together with its dependencies, on several platforms, with the same end user experience.
The key reason for Docker’s success and industry-wide adoption are the benefits that it helps realize – that is, portability, immutability, faster developments and deployments, and efficient resource utilization. It’s important to reinforce that all these benefits trace back to the microservices architecture and twelve-factor design methodologies that we discussed at the beginning of this chapter.