Introduction to docker and containerization day 2
Published: 2020-10-05 15:11:08

Before we dive into Docker, lets understand What is Virtualization?, What is Containerization and Advantages of Containerization over Virtualization

**What is Virtualization?** Virtualization is the technique of importing a Guest operating system on top of a Host operating system. This technique was a revelation at the beginning because it allowed developers to run multiple operating systems in different virtual machines all running on the same host. This eliminated the need for extra hardware resource. The advantages of VM or Virtualization are:

1. Multiple operating systems can run on the same machine
2. Maintenance and Recovery were easy in case of failure 
 conditions
3. Total cost of ownership was also less due to the reduced need for infrastructure
 However, Virtualization has some disadvantages which include:
1. Running multiple Virtual Machines leads to unstable performance
2. Hypervisors are not as efficient as the host operating system
3. Boot up process is long and takes time

**What is Containerization?** Containerization is the technique of bringing virtualization to the operating system level. While Virtualization brings abstraction to the hardware, Containerization brings abstraction to the operating system. Do note that Containerization is also a type of 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 unlike virtual machines.
Finally the following are the **Advantages of Containerization over Virtualization**
1.Containers on the same OS kernel are lighter and smaller
2. Better resource utilization compared to VMs
3. Boot-up process is short and takes few seconds

**What is Docker & why is Docker needed?** – Docker is a containerization platform that packages your application and all its dependencies together in the form of a docker container to ensure that your application works seamlessly in any environment
Wow! That's a mouthful. In simpler words, Docker is a tool that allows developers, sys-admins etc. to easily deploy their applications in a sandbox (called containers) to run on the host operating system i.e. Linux.
 The key benefit of Docker is that it allows users to package an application with all of its dependencies into a standardized unit for software development. Unlike virtual machines, containers do not have high overhead and hence enable more efficient usage of the underlying system and resources.

**So what is a docker container?** Docker Container is a standardized unit which can be created on the fly to deploy a particular application or environment. Docker Containers are the ready applications created from Docker Images. Or you can say they are running instances of the Images and they hold the entire package needed to run the application. This happens to be the ultimate utility of the technology.

**Now what is a docker engine** Docker Engine is simply the application that is installed on your host machine. It works like a client-server application which uses a server which is a type of long-running program called a daemon process, a command line interface (CLI) client and REST API which is used for communication between the CLI client and Docker Daemon.

While defining a Docker container, i mentioned the term **Docker image**. So what is it? A Docker image is a read-only template that contains a set of instructions for creating a container that can run on the Docker platform. It provides a convenient way to package up applications and preconfigured server environments, which you can use for your own private use or share publicly with other Docker users. These Docker Images are created using the build command. These Read only templates are used for creating containers by using the run command. In relation to docker image, we have **Docker Hub**, which is like GitHub for Docker Images. It is basically a cloud registry where you can find Docker Images uploaded by different communities, also you can develop your own image and upload on Docker Hub, but first, you need to create an account on Docker Hub.
**Docker Registry** A registry is a storage and content delivery system, holding named Docker images, available in different tagged versions. ... Users interact with a registry by using docker push and pull commands. In simple terms a Docker Registry is where  the Docker Images are stored.

**Docker Architecture** Docker Architecture includes a Docker client – used to trigger Docker commands, a Docker Host – running the Docker Daemon and a Docker Registry – storing Docker Images. The Docker Daemon running within Docker Host is responsible for the images and containers.
To build a Docker Image, we can use the CLI (client) to issue a build command to the Docker Daemon (running on Docker_Host). The Daemon will then build an image based on our inputs and save it in the Registry, which can be either Docker hub or a local repository
If we do not want to create an image, then we can just pull an image from the Docker hub, which would have been built by a different user
Finally, if we have to create a running instance of my Docker image, we can issue a run command from the CLI, which will create a Container.

After understanding the terms above, lets now install docker in windows operating system.
1. [click here to install 2.Docker(https://download.docker.com/win/beta/InstallDocker.msi)
3. Double-click InstallDocker.msi to run the installer.
4. Follow the Install Wizard: accept the license, authorize the installer, and proceed with the install.
5. Click Finish to launch Docker.
6. Docker starts automatically.
7. Docker loads a “Welcome” window giving you tips and access to 
 the Docker documentation.