Earlier, the process for deploying a service was slow and painful. First, the developers were writing code; then the operations team would deploy it on
There was an improvement with the creation of
Hypervisors have multiple Virtual machines or VMs on the same host, which may be running or turned off. VMs decreased the waiting time for deploying code and bug fixing in a big manner, but the real
What is Docker?
Docker is gaining popularity day by day. One of the main reason of Docker’s growing popularity is due to the fact that it can be used in any IT organization.
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Docker applications run in containers that can be used on any system: a developer’s laptop, systems
Docker is a tool that is designed to benefit both developers and system administrators, making it a part of many DevOps (developers + operations) toolchains. For developers, it means that they can focus on writing code without worrying about the system that it will ultimately be running on. It also allows them to get a head start by using one of
Is Docker like Virtual Machine?
In a way,
Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they’re running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.
A virtual machine is a Guest operating system on top of the Host operating system. Apart from some advantages of virtualization, there are few disadvantages as well. These are:-
- Guest OS or running multiple virtual machines on Host operating system takes a large chunk of its system resources like RAM, processor and its hard disk.
- Virtual machines are not as efficient as its host operating system.
boot up time
How Containerization is different from Virtualization?
Containerization is however more efficient because there is no guest OS here and utilizes a host’s operating system, share relevant libraries & resources as and when needed
Advantages of Containerization over Virtualization
- Since they are using the same OS and other resources, they are lighter, efficient and faster.
- As compared to VM, there is better resource utilization.
- Lesser boot up time
The Docker Engine
Let’s have a quick look at
Docker Engine. Docker Engine is used to develop, assemble, ship and run container based applications. Docker Engine has following components:-
Docker DaemonA persistent background process that manages Docker images, containers, networks, and storage volumes. The Docker daemon constantly listens for Docker API requests and processes them. The Docker Daemon is a service that runs on your host operating system. It currently only runs on Linux because it depends on a number of Linux kernel features, but there are a few ways to run Docker on
MacOSand Windows too.
Docker Engine REST APIThe Docker Daemon itself exposes a REST API. From here, a number of different tools can talk to the daemon through this API. it can be accessed by an HTTP client.
Docker CLIIt is a command-line tool that lets you talk to the Docker daemon. When you install Docker, you get both the Docker daemon and the Docker CLI tools together.
Docker uses a client-server architecture.
Docker client to a
daemon communicate using a REST API, over UNIX sockets or a network interface.
Docker client, this is where we’re running various docker commands to interact with Docker. The client could be installed on your laptop running Windows,
The Docker client provides a command-line interface (CLI) that allows you to issue build, run, and stop application commands to a Docker daemon.
Docker host provides a complete environment to execute and run applications. It comprises of the Docker daemon, Images, Containers, Networks, and Storage. As previously mentioned, the daemon is responsible for all container-related actions and receives commands via the CLI or the REST API. It can also communicate with other daemons to manage its services.
Docker registry is the place where Docker images are stored it can be a Public registry or Local registry.
Docker Hub and
Docker Cloud are public registries that
Various objects are used in the assembling of your application. The main requisite Docker objects are:
Images are a read-only binary template used to build containers. Images also contain metadata that describe the container’s capabilities and needs. Images are used to store and ship applications.
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI.
Services allow you to scale containers across