Docker: Installation
Let us start from the place where we left our last article. We said it's easy to get everything installed and configure just by writing a single command and i.e.
docker run -it redis
Well, before we cut this command into multiple pieces or even prior to installing the docker in our system let us understand what does a mean when our colleague or our friend says they use the docker in their project. that will give us some bit of picture about the docker ecosystem.
The above picture gives you little idea about the components involved in the Docker ecosystem. When someone says they are working with docker that also means they are probably using docker client or docker image in their project or solution or maybe publishing that to docker hub or utilizing the public image from docker hub. In summary, these all terminology we call as docker ecosystem.
One who knows a little bit about docker will definitely ask me a question saying, Hey Brijesh, Where is container here? did you forget or what? why the container is not as part of your docker ecosystem? -- Well, that's true. I haven't added a container in the above picture and there is a reason behind it. But before I answer that question, let me introduce the term "Container" in this discussion.
For those who don't know the container or who have the question of why I have not added container in the above picture, this is important to understand. The Container is something like a running program of a specific image and here the term image is nothing but docker image (refer above diagram, where we said image is one of the components in overall Docker ecosystem). I know this is not enough to describe the container but believe me, for now, this little is good enough and we will come back on this subject again later.
It answers the question of why I have not included that into our ecosystem. Did not get what does that mean. Let us reiterate the word - The container is something like a running program of a specific image. That means we can create as many programs as we want from a specific image right? In other words, the Container is just an instance of an image. In our software world, we don't add the instance of an object into our class diagram - Am I right? Now, I hope that is cleared that container is just a program runs in a memory and that program is nothing but the instance of a docker image. remember the below image for your reference.
Probably by now, you will say, Brijesh enough of theory lesson. Let us have the first practical thing and that is nothing but "How to install docker". Ok here are steps.
- Go to official docker site https://www.docker.com/ and click get started
- You will find a link called "Download desktop and take a tutorial" and once you click it will open a new tab in your browser with https://hub.docker.com/?overlay=onboarding URL which finally redirects and ask for your docker account.
- Now, here we need to create our first docker account and we will remember that throughout our journey. So, I would strongly recommend you to create something which you remember and like to carry in your journey to the docker world.
- I have done mine and I hope you are reading this step 4 means you would have done the same for yours as well. finally, we are on the page called https://hub.docker.com/ with our account.
Finally, download the installer and install that in your system. In this process, your system will get log off and restart. Let that process gets completed. We have done a very important step and it is going to pay away for our next couple of articles where we will utilize this account and do more meaningful stuff. that's it for now. I hope you have enjoyed this article and I will see you in my next article.