How Containers Work?
Containers enable the abstraction away from an operating system and the infrastructure that an application needs to run on. In order to explain how containerization achieves this, it is important to understand the main concepts and components involved.
- The container image contains the all the information for the container to run, such application code, operating system, and other dependencies (e.g., libraries). There are multiple container image formats, most common of them being the Open Container Initiative (OCI).
- The container engine pulls the container images from a repository and runs them. There are a number of container engines such as Docker, RKT, LXD. Container engines can run on any container host, such as on a laptop, on a data center physical server, or in the public cloud.
- The container is a container image that has been initiated or executed by the container engine.