DEV Community

Cover image for The Biryani Mystery That Explains Docker
Hariharan S J
Hariharan S J

Posted on

The Biryani Mystery That Explains Docker

You all might be expecting that I’m going to talk about this tech content By Watching the above video

In the above video cooper dockes his small ship Ranger with the spinning Endurance

Like that, I am going to talk about this session on the famous topic

Docker

Before going into the technical part of Docker, I’m going to explain this topic in a non-technical, story-based way because it will be easier to understand. This non-technical part will only take a few minutes, and after that, we’ll move on to the technical part.

So, without any further delay, let’s get started.

Chapter 1: The Biryani That Couldn’t Be Recreated

One day, I went to Dindigul Thalappakatti and ate biryani. The biryani tasted really good. Then I came home and thought I could make the same biryani myself. I tried making it, but it didn’t turn out like the one I had there.

One of my Favorite Quotes That my Trainer Mr.Muthu Sir said is Programming is Cooking

And my cooking got failed in the procedure of replicating the dindugal thalappakatti biriyani

Chapter 2: The Mystery Behind the Same Ingredients:

I was very curious. We also use seeraga samba rice, and they use seeraga samba rice too. We use chicken, and they also use chicken. We use masala, and they also use masala. Then why doesn’t the taste come out the same?

Chapter 3: The Puzzle Unfolding

Then i Came to Know About This Concept

Standard Operating Procedure(SOP)

A Standard Operating Procedure is a set of step-by-step instructions that people follow to do a task correctly and consistently—often used in workplaces, factories, hospitals, or businesses.

Example: A company may have an SOP for handling customer complaints.

In the same way, Dindigul Thalappakatti would also have an SOP (Standard Operating Procedure). It would contain everything from A to Z — like how long the chicken should be cooked, how long the rice should be cooked, what type of masala should be used, and when the dum process should be done. Everyone there follows that SOP for their work, but I didn’t know that SOP.

99% of the Franchise Model Works On this only The chief chef master
cannot go all places for cooking instead they give their SOP and Their Company Identity

This the model that is using in the Famous Franchise like McDonald's, KFC etc

The Technical Part Of Docker

Why We Use Docker?

Now, let’s say I build an application using HTML, CSS, JavaScript, and React on a Windows operating system. Then I send that code to the testing team, but the testing team uses Linux. In that case, will the code work properly?

The simple answer is NO Because:

File path differences

Windows uses:

C:\project\src
Enter fullscreen mode Exit fullscreen mode

Linux uses:

/home/project/src
Enter fullscreen mode Exit fullscreen mode

So some configurations or scripts may fail.

Package or dependency differences

You may have installed a package version on your system that the testing team doesn’t have.

Example:

  • Your React app works with Node.js version 20

  • Testing team uses Node.js version 16

This can create errors.

Case sensitivity

Windows is usually case-insensitive.

Example:

import Header from "./Header";
Enter fullscreen mode Exit fullscreen mode

Even if the file name is header.js, Windows may still run it.

But Linux is case-sensitive, so it may throw an error because:

  • Header.js

  • header.js

are considered different files.

So There are so many problems like file mis match or version mismatch like that to solve these kind of problems they have introduced one Beautiful area called.

Containerization

So basically what this Containerization do is

now i want to put all my programming codes into one box which means what are all the tech stacks i was used to build the application

with that

i want to tell them what os should be used and what version should be used

with that

i had to put the instruction card which is Equivalent to what we discussed in the previous Standard Operating Procedure (SOP)

Now you have got the idea that why i am telling the story previously

now

I finally wrap the box and give to the testing team, the testing team unwrap the box and read the Instruction card according to that they will set up it run it and got the final output of what i got

You Might Have one question on your mind which is

What is Mean By Instruction Card

The Simple Answer is Instruction Card is a Card which contains a all the Instructions of what os should use,what programming language version should be used like that kind of information it will be stored

Now i am telling you about What is Containerization only Not About Docker

By now this session comes to an important question called

What is Docker

To achieve this containerization in computers, there is a tool called Docker.

Docker is a containerization tool that helps developers package an application along with all its dependencies, libraries, and configurations into something called a container.

Because of this, the application works the same everywhere:

  • on your laptop,

  • on the testing server

  • on Linux

  • on Windows

  • or in production.

Why Docker is Used?

1. Avoids “It works on my machine” problem

Sometimes code works on the developer’s computer but fails on another system.

Docker solves this by packaging:

  • code

  • dependencies

  • configurations

  • environment

all together inside a container.

2. Works on any operating system

A Docker container can run consistently on:

  • Windows

  • Linux

  • Mac

  • servers

  • cloud platforms.

3. Easy for deployment

Developers can quickly move applications from:

  • development → testing → production

without changing setup again and again.

4. Saves setup time

Instead of installing many softwares manually, Docker provides everything ready inside the container.

5. Lightweight and fast

Docker containers are smaller and faster compared to virtual machines.

The History Of Docker

Docker was first released in 2013 by

The Main Reason for Inventing This is That Time He Owned A Company Called

DotCloud owned the company, and the programs they developed in DotCloud ran perfectly on their own computers. However, when they tried to run the same programs on cloud services, they didn’t work properly. To solve this problem, they came up with Docker.

After The Invention of Docker The Whole Software Industry Has Revolutionized

Even The Modern Applications Like Netflix Amazon Runs On Docker Only

Core components Of Docker

  • Docker Engine: The runtime that builds and runs containers.

  • Docker Images: Read-only templates defining container contents and configuration.

  • *Docker Containers: * Instances of images that execute applications in isolation.

  • Docker Hub: A public registry for sharing and distributing container images.

  • Docker Compose: A tool for defining and running multi-container applications via YAML files.

The Language Behind Docker

Now one question came into my mind…

What language was used to build Docker itself?

The answer is Go, also known as Golang.

Around 2012–2013, Solomon Hykes and his team built Docker mainly using the Go programming language.

They chose Go because it was fast, lightweight, simple, and very good at handling multiple tasks at the same time.

And today, that decision became one of the biggest reasons behind Docker’s performance and popularity.

Final TakeAway

At first, I thought the problem was the ingredients.

But later, I understood that the real difference was not the ingredients… it was the environment, the process, and the SOP behind it.

That’s exactly the same problem developers faced in the software world.

  • The code was the same.

  • The logic was the same.

  • But the environment was different.

And that’s when the tech world realized…

Maybe applications also need something like a biryani SOP

That ‘SOP’ in the software world is called a container.

And the tool that made this possible is Docker.

“In the end, Docker didn’t just containerize applications…
it containerized consistency.”

Top comments (0)