We are done with both Dockerfile and Docker Images.
So now, it is time to pay our much needed
attention to the center point of this course, containers.
[No Audio]
We have already seen the formal definition of
containers. But if we consider our updated
knowledge, the simplest way to describe a
container would be a running instance of a Docker Image.
You can compare it to the analogy of process and
program in Linux. Just like a process is a running
instance of a program, a container is a running instance of an image.
With help of namespaces on the Linux host,
containers provide similar isolations like VM.
Each container has its own file system, network
driver, storage driver, and administrative
privileges as well. Despite of all of this, any
container would be at least 100 times lighter than
the VMs hosting the same set of softwares.
[No Audio]
We have seen previously that Docker Images are
made of read only layers, and the top most layer is writable.
Well, this top layer is provided to it
while creating a container out of the image.
With correct network configurations, containers
can also talk to each other via IP or DNS.
It also follows Copy-on-Write policy to maintain
the integrity of the Docker image, which we will explore soon.
[No Audio]
You may wonder what exactly do we mean by running
the image? Well, much less to the surprise.
Run can be defined pretty simply in our context.
It means providing resources like compute, memory and storage.