Mastering Docker: Unveiling the Magic of Containerization for Application ๐Ÿณ

Mastering Docker: Unveiling the Magic of Containerization for Application ๐Ÿณ

ยท

3 min read

Docker is very magical tool which makes impossible possible as it is a very important tool in todays world. Recently, coming towards devops world it has been quite trending nowadays.

What actually Docker is ?

Docker is a magical tool which allows your software or application and its dependencies into a single unit called "Container".

Containers are ightweight, portable, and self-sufficient package that includes everything your application needs to run, such as code, runtime, libraries, and system tools. ๐Ÿš€

Docker uses a client-server architecture, and the Docker CLI (Command Line Interface) helps you interact with the Docker daemon, managing your containers effortlessly. ๐Ÿ–ฅ๏ธ

Docker Architecture ๐Ÿค–

  • First Layer : Here the above layer contains small containers which can be understood as a small room which has all the resources such as basic necessity things present and same goes with containers who has all dependencies inside to run that specific container.

  • Second Layer : Here comes Docker Engine which can be known as a powerhouse of docker magic which has all of the following components.

    Key Components:

    1. Docker Daemon (๐Ÿ‘ฟ): This daemon is like the silent guardian, always running in the background, handling container operations and managing the Docker API.

    2. Docker CLI (๐Ÿ› ๏ธ): The Command Line Interface is your wizard's wand! It lets you interact with the Docker Daemon, casting spells (commands) to build, run, and manage containers.

    3. Containerd (๐Ÿ“ฆ): Imagine this as Docker's container caretaker. It takes care of the low-level container operations, leaving the Daemon free to handle higher-level tasks.

    4. RunC (๐Ÿƒ): This is the sprinter! RunC is responsible for running containers based on the Open Container Initiative (OCI) specification.

  • Third layer: It can be considered as any operating system which contains the kernel . now what is kernel , it's an core component of any operating system which acts as a bridge between software and hardware.

  • Fourth Layer : it is the layer of Hardware where all resources and functionality are present such as RAM, storage, network ports etc. This hardware functionality are communicated by kernel.

Architecture of Docker

How to create Docker Images:

  1. In order to create docker images, we should create docker file which contains all the basic prerequisites of how to pull the required dependencies from dockerhub and basic commands to run the specific application.

  2. Secondly, after creating dockerfile we will build that docker file with some command to make it ulitmately a docker image. It will take few minutes to convert dockerfile into docker image.

  3. Lastly, we can see the docker image running through the command "docker images" . There will be listing of all the running docker images which are running in background.

  4. basically how containers are made through image

    File -> Image -> Container

Conclusion:

if you have read till here than you really have a good theoretical knowledge of docker. This will ultimately clear your basics if you are a beginner or a master of docker. Thanks for reading this blog as I have discussed about docker overview.

Every bit of knowledge is a stepping stone toward your brightest self. ๐ŸŒŸ Keep curious, stay resilient, and let the joy of discovery propel you forward! ๐Ÿ“š

Did you find this article valuable?

Support CodeAryan by becoming a sponsor. Any amount is appreciated!

ย