What is a Docker?
ONE OS and ONE Desktope APP but using the same time multiple app just by in one Desktope APP, which is called a DOCKER.
I remember that when I first start to learn a docker in my during programming life, I was seeing a lots of article or videos about one sentences such a like “My application runs perfectly on my laptop, but not when I deploy in the cloud.” or “My colleague and I have the same code base. It works on my colleague’s laptop, but it doesn’t work on my local laptop.”? But belive or not this thinking or sentences which have you seen is totally wrong to learn docker. Yes it SUPER WRONG! As an real example I was working a company where we use either docker or devops tools etc once a time When I pushed my own branch to develop I encounter a problem which is related CI/CD. So what? What happened, using docker solved this problem?
I am going to explain everhyting that you need to know about docker in this article. After you finished that article you will encounter every problem that how to solve this and etc. I’l explain everyhing about docker terminologies that you need to know and explain how I learned the docker as well. So without further ado let’s get started.
While learning docker I encounter a little bit terminologies that I hardly understand. As an example, we can show the following.
- Image
- Container
These are two terminology super confusing when you encounter. I decided that learning those terminology words are not important to learning docker. If you know that what these terminology means, you must understand some computer terminologies words.
IMAGES
For example you should thinking and you must asked for yourself that what is a file and what is a folder and What are the files for? Let me give you an example which you every day used to in your life. Have you ever played any game on your computer? If so What was you doing when you playing a game on a desktope? So let’s together explain every step by step.
1)Firs you were double click any game icon on your desktope of pc, weren’t you?
2)When you clicked any game on your computer game that you opened a little bit second was starting, wasn’t it?
3) Have you interested any time that how game opened and when you click on game of location file folder you see that there are a lots of file that need to in order to open game?
I hope these explanations are very obviously that you reminder. Docker Images that you thinking like any file that need to open a game that every files are related for opening a game. What does Docker itself say about IMAGES? “Images are kind of files that keep all the necessary tools(dependencies,library etc.) to run your project in Docker.”
That’s it. I rely that you understand very clearly when you comprise both terminology. As you understnad what are the images and why these are exist in docker world let’s get skip the next term which is called CONTAINER.
CONTAINER
Containers are actually images, the only difference is that containers are files with like exe extension that can be created when the dcoker is running. For an instance I chose Java as the programming language to explain the CONTAINER in a nice but simple way.
- First you write your own codes in your .java extension files, do you?
- When you run the project your .java extension files compiled .class extension files, did you?
I think everything has been explained to you now. As we understand we can think a containers are like .class extension files and images .java extension files.
So, you can give me a question, okay, we understood them, but what does it have to do with us being able to use docker to understand them? I answer a question that Everything consist of non executable file and executable file in computer science of world. As a docker used to file methodological term as well.
- Docker only advantage is that docker allows you to run multiple programs(web-applications,desktope-applications,mobile-applications etc.) simultaneously in isolated containers.
- In this way, you can run an unlimited number of programs in a single operating system using only Docker without using any virtual tools.
I shared a picture about docker architecture in the following: