What is Docker, Docker Container, and Images?

Introduction to Docker.

Sachin Jhaveri
4 min readApr 27, 2020
Shipping Containers (A good analogy for docker containers).

Docker is a tool that is used by the developers to create a Containerized Web Application.

Developers are able to package all the necessary libraries and dependencies which are useful for running that application into one package.

This package is called an Image of that Application which we will discuss further as well.

This Image can be further used to run inside a Container.

So Why Use Docker?

Consider a developer developing an Application On Windows machine and then sharing the whole application to someone who is using a Mac.

Consider an Application Built on NodeJS with all the dependencies required.

When the Operations counter-part tries to run the same application on Mac they have to install the runtime(Node) inside their machine and then try to run the application.

Although the dependencies might remain the same the Mac counter-part might face some issues with running the application due to the various reasons.

A few of the reasons can be

  • Support of a particular package differently on Windows and on Mac.
  • Versioning issues of packages due to the support on both the systems.
  • A requirement for a particular application to run can be more in MAC(Linux) then in windows and many more.

Due to this, the people in the Operations part of the application development might only have a partial application from the developer to carry on their work rather than a complete application to work their part on.

The Operations team now has to figure out how to make the application complete for their part to work on.

Docker is a tool that provides a better solution by providing a complete package of an application to work on.

Consider Docker as an Environment that you can use to push and ship the code using the Settings that Docker provides

On the other hand, the Operations team uses the same environment for working on their part which makes the Developers and the Operations on the same ground.

Now consider, even if the developers are using Widows for Development but while shipping the code uses this Environment(Docker) to ship the code to Operations team and they accept the application and run it on the same environment

The Operations team already has all the bells and whistles which are required for running an application on the docker environment even though they have a Mac with them, and docker installed inside the Mac in his device.

DevOps Infrastructure and Working.
  • Docker is considered an advanced concept, something above virtualization but been inspired by virtualization as a concept. You can read more about virtualization and its concepts over here.

What are Containers and Images in Docker?

Consider the following example

Consider you have Virtual Box installed inside your system and you want to install RedHat and Ubuntu onto it.

The first step you will do is download the ISO images of each of the OS from their official website, eg. Ubuntu

Then what you will do is create a new VM in the Virtual Box to install different images onto it such that you can run each of the ISO(images) onto each of the VM’s created.

In the above example consider the Instance Creation as the process of creating a CONTAINER, and running inside each CONTAINER are IMAGES(ISO) of that particular OS.

Similarly in Docker, a CONTAINER is something that runs INSTANCE of an IMAGE.

In the above example, you can create multiple VM’s but can have either the same ISO(image) running onto each VM or different ISO(image) running on different VM’s.

Similarly in DOCKER, you can create MULTIPLE CONTAINERS with the same IMAGE but different instances of that Image or Multiple Containers with different IMAGES as well.

CONCLUSION

  • Docker is a tool that can help developers to only take care of the development part irrespective of the OS/Environment used on the other side operations team can manage and deploy not considering the OS of the counter side.
  • Containers can be considered as a standard unit of software that can run the same/different instances of an image quickly and effectively irrespective of the environment that they are placed into.
  • An Image is a packaged software with all the configurations required which can be used to provide the functionality of that particular software.

--

--