So why do you need to know about containers? Well, you need to
know about them because containers in Linux are another way to start applications.
So that's how I would like to define a container as an application that is
started in an environment that is isolated by Linux kernel namespaces from a container image.
There's two components in that definition that need some additional explanation.
First component is the namespace.
That is a level of isolation that is implemented by the Linux kernel. And that makes sure that
within the container, only files, users and processes that are relevant to that container are available. And that's
good news, because that means that your containerized application cannot go up into the operating system.
The second component is a container image that contains
all dependencies that are needed to run the application.
And that means that you suddenly don't have a problem with dependencies anymore. They're just there.
Container images are obtained through the container Registry.
That's an online resource, little bit like a repository where anybody can post their container images.
And a kernel that is provided by the host operating system as a container
is really focusing on running the application. You do not need a kernel inside
a container to run containers. There's a couple of requirements on a container host.
The host that runs a container has the container runtime.
The container runtime is a small program that starts a container. And
there is a container manager software which allows you to manage them.
Common container runtimes are containerd and CRI O. And common container managers are Docker and podman.
Now, the funny thing is that nobody ever thinks about the container runtime that they need.
You just install either Docker or Podman to get started with containers, and that's it.
The runtime comes with it.
Container technology itself is standardized by the oci, which is the Open Containers initiative.
And this standardization means that the same container image can be used
on a standalone platform, in a distributed environment or in cloud.
And that also explains why containers so rapidly have become very popular.
As a developer, you can develop an application on your local laptop, you can do the
testing on your local laptop, and once you have proved that it works out all right,
you can run the exact same application in a distributed platform like a cloud as well.
And that is why containers have become the de facto standard for running applications nowadays.