What Really is Docker Image?

Salih Cantekin
3 min readNov 26, 2020

What is this Docker?
If you have never heard of the concept of Docker before, I think it is very likely that you will wonder about what you call “What is Docker”. Therefore, you can get information about this matter by reading the “What is Docker and why it came about” article here or by watching the free Docker training set I prepared on Youtube.

Dockerfile and Docker Image Relationship
Yes, I guess I can think that you finished reading my other post and picked up where you left off. The concept of Docker Image is actually a concept that should be explained with Dockerfile, but when explaining Dockerfile, Docker Images should be mentioned. So, in order not to create a paradox, I will go into the subject without talking too much about Dockerfile for now.

Docker Image

Containers on Docker, which I refer to as 80% virtual machines, need a program to run in them. Even if I said a program, we add that you cannot run any kind of program directly on the Container. These programs can only be run by putting them in boxes called Image. Actually, this is the essence of the matter. Normally, we need a server to run a project you have developed in .Net, NodeJs, Java, or another programming language, and that server has to host libraries and/or subsystems that can run our system. For example, we need IIS for a project written with Asp.Net on a Windows server. This IIS runs on Windows operating system.
The boxes we call images actually provide this environment for us. It contains an operating system and the working environment (IIS) of your application. But wait a minute, if I install the operating system and then IIS into each Image, wouldn’t it be too big? So where is the advantage of using Docker? These are very logical questions, and in Docker, there are logical answers to your logical questions.

Docker Image Example and Size Description

When you install an operating system on your computer, a lot of additional features come with that system whether you need it or not. Of course, these features also take up a certain place on the disc. For example, if you install Windows Server 2012 and then IIS for a 100 MB project, you will need 5–6GB of space on the disk. In order to keep the size of Docker Images small, only enough files that IIS will need have been prepared by the authorities. Don’t just think of it as IIS. If you are going to run an HTML project on Linux, you can consider the same example for Linux and Apache. So, where to find and how to use them, even if you say these Images created by these “authorities”, Docker has its own “Hub” (Docker Image Repo) and you can find it here.

Docker Image Hub

So as we can understand from here, we need a previously created Image to be able to run our projects? The answer is both yes and no. Yes because every Image must consist of a basic Image. No, because we can create our own Images using Dockerfile if needed, but we will still have to make use of a basic Image. When we create a Docker Image, we actually have a basic operating system + the working environment of our project (IIS, Apache, etc.) + Project files in a package and make it ready for a Container to run.

If you say “I didn’t get it completely from that article, and wish there were a video that I could watch”, just click here and enjoy.

You can learn more about this by following my other articles about Docker.

--

--