Docker

Docker is a platform for packaging, deploying, and running applications. Docker applications run in containers that can be used on any system: a developer’s laptop, systems on premises, or in the cloud.
Docker packages applications as images that contain everything needed to run them: code, runtime environment, libraries, and configuration. Images run in containers, which are discrete processes that take up only as many resources as any other executable.

Virtualization:
Virtualization is the technique of importing a guest operating system on top of a host operating system. By using Virtualization we can run multiple OS on same Host OS platform. This leads to performance degradation as guestOS running on HostOS has it’s own kernel and set of libs and binaries, This takes up a large chunk of system resources i.e harddisk, processor and RAM.

Containerization:
Containerization is also a type of virtualization. Containerization is the technique of bringing virtualization to OS level. Containerization is more efficient as it can use host os to run apps inside the containers, it will share relevant libraries & resources as and when needed unlike VMs. Application specific binaries and libraries of containers run on host kernel, which makes processing & execution very fast. All containers will share host OS and holds only application related binaries and libraries.



Containers vs VMs
  • A container shared the kernel of the hosts machine with other containers. It runs a discrete process taking no more memory than any other executable making it light weight. In contrast, a VM runs a full blown guest OS with virtual access to host resources through hypervisor. VMs provide an environment with more resources than most apps needed.
  • Containers on same OS kernel are lighter & smaller where as VM size is huge.
  • Better resource utilization compared to VMs.
  • Boot-up process is less for containers and it will take only few seconds. For VMs boot-up process is high as it need to start all OS processes before it runs actual application.
Docker advantages:
Lightweight: Docker container size is very less hence it is light weight. It shared host kernel to run application. Also it will mount other image layers to reduce the size of container.
Portable: we can build out image locally and publish image to cloud. We can reuse same image where ever we want to use.
Interchangeable: we can deploy updated/upgrades on fly.
Scalable: we can increase and automatically distribute container replicas using tools like Kubernetes and Docker swarm. 

Installation of docker-ce:
For CentOS platform:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io -y
sudo systemctl start docker
sudo systemctl enable docker

                                               
                                                                                                                                                  Next >>





No comments:

Post a Comment