Table of contents
Hey everyone, for those who are looking to start their journey in DevOps, or want their application to run on any platform or client without errors guys, I've crazy news for you. I am Manjunath, I am a GDSC DevOps and Opensource Lead at Parul University. I help you learn Docker, which helps you to have a kickstart in your DevOps journey and also for people who want their application to be successfully running on any client host. Let's see what you can expect from these tutorials.
I can't assure you that you become a Docker expert after reading this tutorial. But what I suggest is that to please sincerely follow me in every step of each tutorial so that you can get the maximum out of this.
You can expect the complex architectures and concepts of Docker can be explained simply using illustrations, my storytelling method and other methods which can help you to understand the concepts of Docker.
In an implementation, I am creating a Docker-Tutorial Repository on GitHub, in which I include all resources I've followed related to docker, and as it is completely open-source I highly recommend you to propose or commit any changes to it, I am ready to merge those.
We will be creating a few projects related to Docker which will help you to implement those better and work on real-world projects easily.
I request you to please share this tutorial, and support my work.
In this article, we are going to learn about the "Containers". Before that, I would like to tell you a few concepts which help you to understand it better.
Let's take an instance that you as an engineer at an X company want you to deploy a new application. For this, the manager appointed you as a lead for this team. Generally, before a few years you set an instance of a server (Local) and then you install and continue with the workflow.
In the Virtual Machine, you install all the Dependencies, required all the code and other stuff you bring all those to a place and you run the application and make it live to the world so everyone can access it.
But after a few years, everyone started using Containers instead of Virtual Machines. Firstly, what are Containers?
- Containers act as an encapsulation of an application with its dependencies. In which you can run your application, you can make it live to the World like in VM.
Then what are the parameters that differ Containers from Virtual Machines?
Imagine that the application you've deployed (for X) on the server is having some trouble for users because of some bugs or any other issue, so what you can do is turn off the VM as an Operator of the application.
VM takes more time to start or stop as compared with Containers
. These containers can be started or stopped in a fraction of a second. But in the case of VMs, you can't do it so.In a server, Virtual Machine consumes more space than Containers. These are lightweight than VMs. So instead of using multiple virtual machines with heavy weight, you can use containers multiple that are lightweight and as it consume hardware resources less as compared with Virtual Machines.
As Containers are lightweight, they are supposed to be more portable than Virtual Machines.
On containers, we can download and run complex applications without needing to spend hours on configuration and installation issues or worrying about the changes required to their system. By Dockerizing your application, you can do this. We will cover this documentation in the upcoming tutorial.
This is the most important point when it comes to using Containers instead of Virtual Machines. Read this carefully, to run an application on a Virtual Machine you need a Hypervisor.
Hypervisor is a form of Virtualization software that is used in Cloud hosting to divide and allocate the resources on various pieces of hardware.
This hypervisor helps to partition, isolate or abstract and it is called a Virtualization Hypervisor.
To run your Virtual Machine, you need a full copy of the OS, the application being run and any supporting libraries.
But, to run your applications on Containers, it doesn't require any sort of separate Operating System or separate kernel. You can happily run your applications on it.
This means containers are always constrained to running the same kernel as the host.
So, we can say that processes that are running on containers are equivalent to native processes on the host.
Docker and Containers
The Docker is ts a tool that helps to container the applications and run them on any hardware platform. Docker has two platforms, Docker Engine and Docker Hub. Just like Git and GitHub.
In Docker Engine, you make your applications containerized, you work on them, play with them and so on. But, on Docker Hub, you push your Docker images to it, and people can pull your image from your repo and they can work on it. (Pretty close to Git and GitHub, right?). We'll get back to Docker images in the next tutorial, in which we create our image push it to the docker hub and run it on any hardware. We have Something big planned for you, so please make sure to follow me and comment down below if you have any queries.
Docker Engine - Responsible for creating and Running Containers
Docker Hub - A cloud service for distributing containers.
Docker Swarm then???
Docker swarm is a command line utility for provisioning Docker Hosts. Confused? We'll that's okay to be confused while learning Docker, don't worry... We'll get to know everything about docker soon in the upcoming parts of this tutorial.
Containers are essential for developers who care about quick and iterative development cycles where they can promptly see the results of code changes. The changes brought about by Docker are significantly changing the way we develop software.
In the next tutorial, we are going to install Docker on your Machine and run a few basic commands on the Docker Command Line interface. Till then, have a great experience with Docker and Containers.