Simply Explain The Concept of Docker

Simply Explain The Concept of Docker

Before going in-depth let’s see an interesting scenario that we all have faced already. What’s the scenario???

Well. As a Software Engineer or a Developer, you have developed or are developing an application. Now, you want to share the application with others. The fact is here, Your application is working properly on your machine but doesn’t somewhere else. Can you think of three reasons, Why?

  1. One or more files missing
  2. Software version mismatch
  3. Different configuration settings

To solve the issue and to make easy the developing process we are going to explore Docker.


What is Docker?

Docker is a software platform that simplifies the process of building, running, managing, and distributing (shipping) applications. ??

By using Docker, we can build, run, and ship our application consistently. So if your application works on your development machine, it can run and function in the same way on other machines.

To get started we have to know some simple terms Docker Image, Container, Hypervisor.

Hypervisor: Let’s have a Mac and on this Mac, we can run two virtual machines(VMs), one running Windows, and the other running Linux. How do we do that? Using a tool called Hypervisor (hypervisor is a software we use to create and manage the VMs).

There are many hypervisors. Like

  • VirtualBox
  • VMware
  • Hyper-v (only for Windows)

Docker Image:?

A Docker image is a read-only template that contains instructions for creating a Docker container. It is similar to a blueprint for building a house. The image contains all the necessary code, libraries, and dependencies required to run an application.

Container:

A Docker container is a lightweight, isolated environment that packages up an application and all of its dependencies. Containers are created from images, which are read-only templates that contain instructions for building a container.

Let’s simplify the full concept with a short story. Imagine, your wife made lunchboxes for you. Each lunchbox holds a full meal, including a sandwich, some chips, and a dessert. You have several lunchboxes, and they all look the same from the outside.

  • Each lunchbox represents a Docker container.
  • The contents of the lunchbox (sandwich, chips, dessert) represent the application and its dependencies.
  • The recipe for making the lunchbox (turkey sandwich, veggie sandwich) represents the Docker image.
  • Taking a lunchbox out and eating it represents running a Docker container.

Okay. Everyone wants to know what is the main difference between VMs and Containers.

  • VMs have their full OS and are typically slower.
  • Containers share the host’s OS and are typically faster.


Docker provides software developers with the following key benefits:

  1. Portability: Docker containers encapsulate an application and its dependencies, ensuring consistent behavior across different environments.
  2. Isolation: Containers isolate applications from the underlying system, preventing conflicts between dependencies and ensuring a clean development and deployment environment.
  3. Efficiency: Docker enables efficient resource utilization by sharing the host OS kernel among containers, reducing overhead and improving performance.
  4. Consistency: With Docker, developers can create reproducible builds, ensuring that the software behaves consistently across development, testing, and production environments.
  5. Scalability: Docker facilitates easy scaling of applications by allowing the deployment of multiple containers, which can be orchestrated and managed efficiently using tools like Docker Compose and Kubernetes.
  6. DevOps Integration: Docker supports a DevOps workflow, allowing developers to build, test, and deploy applications seamlessly, promoting collaboration between development and operations teams.
  7. Versioning and Rollback: Docker images can be versioned, making it simple to roll back to a previous version in case of issues, and ensuring a reliable release management process.
  8. Resource Optimization: Docker optimizes resource consumption by running lightweight, standalone containers, reducing the need for virtual machines and minimizing infrastructure costs.


That's it from the part one. Next move on to the technical part of Docker in the next article.

要查看或添加评论,请登录

Md Shah Jalal的更多文章

社区洞察

其他会员也浏览了