Understanding
Containerization
Overview
Containerization definition
Brief history
Containerization architecture
Basic concepts of container
How to create container images
2
What is containerization
• Containerization is packaging an application
with its dependencies, such as libraries and
other binaries, into a single unit called a
container.
• Application within the container can be moved
and run consistently in any environment and
on any infrastructure, independent of that
environment or infrastructure’s operating
system.
3
Brief history of containerization
• The concept of containers has been present
since 1979 as part of Unix version 7.
• Chroot marked the beginning of container-style
process isolation by restricting an application's file
access to a specific directory -- the root -- and its
children.
• A key benefit of chroot separation was improved
system security, such that an isolated
environment could not compromise external
systems if an internal vulnerability was exploited.
4
Brief history of containerization
• Containers gained widespread usage decades
later as various Linux distributions introduced
new tools for deployment and management.
• The biggest drawback to containers in those
early days was the simple fact that they were
anything but portable.
• The 2000s were alight with container technology
development and refinement. Google introduced
Borg which provided varied degrees of container
orchestration and cluster management
capabilities. 5
Brief history of containerization
• In 2013, Docker containers were introduced with an easy-
to-use GUI and the ability to package, provision and run
container technology.
• The containerization began becoming part of the IT
mainstream. Docker’s prominence led to the innovation of
sophisticated containerization platforms, including
Marathon, Kubernetes, and Docker Swarm.
6
Containerization and Cloud
Computing
• Containerization is now a fundamental part of
cloud computing infrastructure.
• The simplified and flexible deployment
architecture established by containerization
can directly support the primary Cost
Reduction and Business Agility business
drivers behind cloud computing.
7
Containerization Architecture
Containerization architecture consists of four essential
component layers.
Underlying IT infrastructure is a base layer that
includes the physical compute resources (for
example, desktop computer, bare-metal server).
Host operating system: This layer runs on the
physical or virtual machine. The OS manages system
resources and provides a runtime environment for
container engines.
8
Containerization Architecture
Container image: The container engine provides
the execution environment for container images
(read-only templates containing instructions for
creating a container). Container engines run on top
of the host OS and virtualize the resources for
containerized applications.
Containerized applications: This final layer
consists of the software applications run in
containers.
9
Containerization Architecture
10
Container basics
Containers:
•A container is a virtualized hosting environment that
can be optimized to provide only the resources required
for the software programs it hosts
11
Container basics
Container images:
•A container image is a predefined template that
is used to create deployed containers
12
Container basics
Container engine:
•The container engine is responsible for creating
containers based on predefined container images.
•The container engine is deployed in a physical or
virtual server’s operating system from where it can
abstract the resources required for a given container
•The container engine is a core part of a
containerization platform and is responsible for many
of its primary processing tasks.
13
Container basics
Container engine:
A given container engine
can create multiple
containers.
14
Container basics
Pods
A pod, also known as a logical pod container, is a
special type of system container that can be used to
host a single container or a group of containers that
have shared storage and/or network resources, and also
share the same configuration that determines how the
containers are to be run.
15
Container basics
Hosts
•A host is the environment in which a container
is deployed. A host can be referred to as a
server or a node.
•The host provides the operating system from
which the container abstracts the resources it
needs to support the programs it is hosting.
•Multiple containers can be deployed and run on
a single host
16
Container basics
17
Virtualization vs Containerization
• A virtual server provides a virtual version of a
physical server’s entire operating system,
whereas a container only provides the subset of
the operating system resources required by the
software program it is hosting.
• As a result, a container consumes less space
and performs more efficiently than a virtual
server.
18
Containerization on Physical
Server
• When deploying containers on a physical server,
the containerization platform requires no
virtualization environment since virtual servers
are not required.
• The underlying physical server has an OS
installed, and the containerization platform can
create containers that each only abstract the
subset of the OS relevant to the software
programs it hosts
19
Containerization on Physical
Server
A physical server with an
operating system hosts a
containerization platform that
creates containers, each with an
environment that has only a
subset of the underlying operating
system.
20
Containerization on Virtual
Server
• When deploying containers on one or more
virtual servers, the containerization platform can
be implemented on a Type 1 virtualization
environment or a Type 2 virtualization
environment with a hypervisor
21
Containerization on Virtual Server
A physical server with no
operating system hosts a
hypervisor that creates
virtual servers with
operating systems, each of
which hosts a
containerization platform
that can create containers
that only have an operating
system subset.
22
Containerization on Virtual Server
A physical server with an
operating system hosts a
hypervisor that creates
virtual server environments
with their own operating
systems. Each virtual
server hosts a
containerization platform
that creates containers that
host a subset of the
operating system.
23
Containerization Benefits
Portability:
•A container creates an executable package of
software that is abstracted away from the host OS.
Hence, it is portable and able to run uniformly and
consistently across any platform or cloud.
Speed:
Containers are “lightweight,” meaning they share the
machine’s OS kernel. This feature not only drives
higher server efficiencies but also reduces server and
licensing costs while speeding up start times, as there
is no operating system to boot.
24
Containerization Benefits
Efficiency
Software running in containerized environments
shares the machine’s OS kernel, and application
layers within a container can be shared across
containers.
Thus, containers are inherently smaller in
capacity than a VM and require less start-up time,
allowing far more containers to run on the same
compute capacity as a single VM.
This capability increases resource optimization
and drives server efficiencies, reducing server and
licensing costs.
25
Containerization Benefits
Fault isolation
Each containerized application is isolated and
operates independently of others.
The failure of one container does not affect the
continued operation of any other containers.
Development teams can identify and correct any
technical issues within one container without any
downtime in other containers.
Also, the container engine can leverage any OS
security isolation techniques to isolate faults within
containers.
26
Understanding container images
• Container images are a central part of
containerization platforms.
• They form the basis of ongoing container
creation.
• The processing of container images is one of
the primary responsibilities of the container
engine
27
Understanding container images
Container Image Types and Roles
There are two primary types of container images:
•Base Container Images – These container images
act as templates for customized container images.
•Customized Container Images – These container
images are created by the container engine, which
then uses them to create actual, deployed containers.
When a symbol is only labeled as a “container
image,” it is implied that it has been customized.
28
Understanding container images
• A customized container image created from a
base container image can itself become a base
container image to be used as a template for
future, different customized container images
• A container image classified as a base
container image is published to the image
registry, from where it can then be accessed by
the container engine to form the basis of
customized container images
29
Understanding container images
30
Container Image Immutability
• A key characteristic of container images is that,
once created, they are immutable.
• If a change to a container image is required,
then a new or revised build file needs to be
created and a new version of the container
image needs to be generated.
31
Container Build Files
• A container build file (or just the build file) is a
human-editable, machine-processable
configuration file that specifies what belongs in (or
what is abstracted by) a customized container
image
32
Container Build Files
• Specifically, the build file can identify:
• the base container image that will be used to
form the basis of the customized container
image
• the additional operating system resources to be
added to (or abstracted by) the customized
container image
• the container network(s) in which the deployed
customized container will need to participate
33
Container Image Layers
• A container image organizes its content into
layers. Each layer corresponds to a container
build file statement or instruction.
• Examples of content in container image layers
include:
• data files and folders
• configuration files
• databases and repositories
• executable files
• operating system program files and runtimes
34
Container Image Layers
• Except for the very final layer, all the layers are read-
only. The containerization platform uses a union file
system as the basis of container image layering.
A base container image is
comprised of a number of layers
that represent what it abstracts.
35
Container Image Layers
• The customized container image that is derived from the base
container image will add layers to what is provided by the base
container image. In the customized container image, the entire base
container image represents the bottom layer
36
Container Image Layers
• A layer within the customized container image is comprised of the
software program that the deployed container will be responsible
for hosting.
37
Container Image Layers
Because container images are immutable, if a
layer within an image needs to be removed or
added to, a new container image version needs to
be created.
38
How Customized Container
Images Are Created
The container engine uses the build file together with the base
container image to generate the customized container image
• The administrator
authors a build file for
Container A (1).
• The administrator
provides the build file
to the container
engine (2).
39
How Customized Container
Images Are Created
• The container
engine retrieves the
required base
container image
from the image
registry (3).
40
How Customized Container
Images Are Created
The container engine
then uses the base
container image and the
information from the
build file to create a new
customized Container
Image A, from which it
then generates and
deploys Container A (4)
41
Container orchestration
• Container orchestration is a software technology
that allows the automatic management of
containers.
• This is necessary for modern cloud application
development because an application might
contain thousands of microservices in their
respective containers.
• The large number of containerized microservices
makes it impossible for software developers to
manage them manually.
42
Container orchestration
Benefits of container orchestration
•Developers use container orchestration tools to
automatically start, stop, and manage containers.
•Container orchestrators allow developers to
scale cloud applications precisely and avoid
human errors.
•For example, you can verify that containers are
deployed with adequate resources from the host
platform.
43
Types of Container Technology
Examples of popular technologies that developers
use for containerization.
Docker, or Docker Engine
•Docker is a popular open-source container runtime
that allows software developers to build, deploy,
and test containerized applications on various
platforms.
•Docker containers are self-contained packages of
applications and related files that are created with
the Docker framework.
44
Types of Container Technology
Linux
•Linux is an open-source operating system with
built-in container technology.
•Linux containers are self-contained environments
that allow multiple Linux-based applications to run
on a single host machine.
•Software developers use Linux containers to
deploy applications that write or read large
amounts of data.
45
Types of Container Technology
Kubernetes
•Kubernetes is a popular open-source container
orchestrator that software developers use to
deploy, scale, and manage a vast number of
microservices.
•It has a declarative model that makes automating
containers easier.
•The declarative model ensures that Kubernetes
takes the appropriate action to fulfil the
requirements based on the configuration files.
46
Conclusion
Understand what the containerization is
How the containerization works
Understand the basic concepts of container and how
to create and customize container images
Types of container technology
47