If you are a developer and an active community member, you must come across the term Docker. When I heard about Docker, the first question that arose in my mind is, What is Docker? And why is everyone talking about it? 🤔
In this post, we try to understand docker, and it's use cases and installation as well. So without any delay, let's dive into it.
Docker is a tool that reduces the gap between Development and Deployment phase of a software development cycle.
Imagine the time when developers used to spend their time to make a machine compatible to run their code. They need to install all dependencies, setup database, and so on. This process was very time consuming, and it requires a specialised person to do this stuff.
Another scenario is, assume you have more than one application or webserver to run that uses different languages and versions of the software.
Now you may think this problem could be solved by using VMs (Virtual Machines) so...
Virtual Machines makes the copy of the whole operating system, which will be GBs in size, whereas Docker needs only the part that you need to run your application. Take a look at the image below. It will help you to visualise the difference.
Docker is like an airtight container that runs independently without interrupting to other processes. This is the reason you can run as many containers you want at a time. Another benefit is, Docker containers are sharable. You need to run a few docker commands, and the application is ready to run, You don't have to invest time in setting up the environment. Now the days are gone when developers use to make an excuse that it works on my machine.
Go to docker official page
Signup or log in.
Download Docker Desktop.
Install and login to Docker Desktop.
Open Terminal and run
You will see something like this.
Congratulations you have successfully installed docker, and it is ready to use now.
In the next post, we will learn how to use official docker images and other commands.
Until then, Bye.