Docker
Basic Understanding of Docker
What is Docker?
- Docker is the world’s leading software container platform.
- Container allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.
- Docker makes the process of deploying very easy and cheap.
How Docker Works?
- dockerfile: describes steps to create Docker image It’s like a recipe with all ingredients and steps necessary in making your dish. In a docker workflow a developer will define all the application and it’s dependencies and requirements in a file named dockerfile.
- Docker Container: It will have application with all its dependencies. These are the runtime instances of the docker image and these images can also be stored into online cloud repository named Docker Hub.
Use of Docker
Docker on the basic level resolves the issue regarding one piece of code working on one platform and not working on another platform.
- Docker makes the process of application deployment very esy and efficient and resolves a lot of issues related to deploying applications
- Docker is present in the entire workflow. But its main use is in deployment.
Virtualization vs Containerization
- Containerization is very fast and lightweight as compared to Virtualization as we don’t have to allocate any fix amount of memory and space. VMs memory allocation is already fixed and it does not change as per the application needs.
- In VMs we have different OS for each different application.
Need of VM over Host OS
- There can be a scenario where we need a VM over Host OS & then have containers.
- For example running window application on a Linux OS, we need to have a VM first which will have a window OS then we can have containers over it.
Docker has a client-server architecture
- Docker Server receives command from the docker client in the form of commands (CLI) and Rest API request.
- Docker Daemon consists of all the containers.
- Docker Client and Docker Server together are called as Docker Engine.
- Docker Client and Docker Daemon can be present in the same host or different hosts.
Benefits of Using Docker
- It resolves the issue of code working on one system but not in other system.
- With the help of docker we need to build application only once we don’t need to build and configure multiple times on different platforms.
- No need to worry about portability. Docker containers can run on any platform. It can run on your local system, Amazon ec2, GCP, Rackspace server, Virtual Box Etc.
- We can only do version controlling. Like Git, Docker has in-built version control system.
- Every app works in its own container and does not interferes with other apps.
- Docker allows faster and efficient deployments without worrying about running your app on different platforms. It increases productivity many folds.
Additional Resources
With all this, let’s end this blog as this is it of Docker Basics. If you will find any issue regarding concept or code, you can message me on my Twitter or LinkedIn. The next blog will be published on 24/02/23.
Some words about me
I’m Mohit.❤️ You can also call me Chessman. I’m a Machine learning Developer and a competitive programmer. Most of my time is spent staring at a computer screen. During the day, I am usually programming, working to derive insight from large datasets. My skills include Data Analysis, Data Visualization, Machine learning, and Deep Learning. I have developed a strong acumen for problem-solving, and I enjoy occasional challenges.