Mastering Docker: Unveiling the Magic of Containerization for Application ๐ณ
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:
Docker Daemon (๐ฟ): This daemon is like the silent guardian, always running in the background, handling container operations and managing the Docker API.
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.
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.
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.
How to create Docker Images:
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.
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.
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.
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! ๐