What is Docker?

Docker is a platform for building, running and shipping applications in a consistent manner. So, if your application works on your development machine, it can run and function the same way on other machines.

With Docker, we can easily package our application with everything it needs and run it anywhere on any machine with Docker. We don’t need to consider the environment, software version, configuration files. They are all included in the package.

This isolated environment also allows multiple applications use different versions of some software side by side. For example,

There is one application use Node 14. Another application use Node 9. Both these applications can run side by side on the same machine without messing with each other.

So, this is how Docker allows us to consistently run an application on different machines. If we want to remove one project, we can just remove the package without worrying about mess up other applications, because each application runs its dependencies inside an isolated environment. We can safely remove an application with its dependencies to clean up our machine.

Container v.s. Virtual Machine

Problems of VM:

  • Each VM needs a full-blown OS
  • Slow to start
  • Resource intensive

Benefits of Container:

  • Allow running multiple apps in isolation
  • Lightweight
  • Use OS of the host
  • Start quickly
  • Need less hardware resources

Architecture of Docker

Docker uses a client-server architecture. So, it has a client component that talks to a server component using a RESTful API. The server, also called the Docker Engine, sits on the backgroud and takes care of building and running Docker containers.

Technically a container is just a process like other processes running on your computer. But it’s a special king of process.

Unlike Virtual Machines, containers don’t contain a full-blown operating system. Instead, all containers on a host share the operating system of the host. More accurately, all containers share the kernel of the host.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

Catalogue