Let’s make Docker easy to understand
Docker image taken from https://1000logos.net/docker-logo/

Let’s make Docker easy to understand

Let’s start by understanding the word “Docker” itself. What is #Docker? I say Docker is where we can dock multiple things together; for example, we can take docking stations for mobiles and laptops to connect various peripherals. The technology we are discussing is a space where we can use multiple technologies.?

Have you ever wondered about the ships which deliver so many goods over distant places or oceans? The items are separated using containers. Each container contains different kinds of products. Let’s understand this using a scenario; suppose a ship is transferring batteries alongside some kids’ toys, and now the batteries can get affected by weather and catch fire, burning all the toys. To prevent this from happening, people thought of using containers to separate different kinds of goods. This is the basics behind the Docker.

So, Docker is a virtualisation tool that enables users to create separate standalone spaces known as containers for accomplishing tasks such as running and deploying projects. In other words, Docker standardises running any number of services with different versions on any local development or production environment, making the process easier. You can download the docker engine from this link based on your machine type: https://www.docker.com


Docker and Virtual Machines

Virtual machines use a virtualisation platform that virtualises the whole operating system, including the application layer and kernel, on the host machine; this way, you can run Linux-based distros on Windows machines and vice versa. But on the other hand, Docker only virtualises the application layer, which means it does not touch the kernel responsible for interacting with the peripherals or hardware of a computer using a tool called Hypervisor. This reduces the package size, which will run your application from GBs to MBs.

Side by side workings of Virtual machine and Docker
Comparison of Virtual Machines and Dockers

What are containers and images?

Obviously, docker containers are not used in ships but are running instances of some composed layers in an image. The layers include the base platform image, the dependent tools and the leading software or application. A docker image contains all the technology required to run your application, and a container uses that image to run an instance where you, as developers, are supposed to work. There can be multiple versions of the same images, and you can create any number of containers from a single image. You can, in turn, create your custom image and publish it on the docker hub with your dependencies and tools.

Layers in an image and containers
Layers in an image and containers


Now, these will require space to run; like in Virtual Machine platforms, we create virtual drives, and Docker uses ordinary folders to accomplish this task. All the data remains in that particular folder for a particular container instance. But once we close these instances, the data is lost. To keep the data intact, we got volumes that are standard locations in the host folder system that can preserve the condition or, say, a snapshot of the running containers. So whenever a container restarts, it can use the snapshot from the attached volumes.

Finally, Docker is used to make the life of a programmer easier. You can use various methods to create docker containers, such as command line tools and the application. Apart from it, there are also multiple ways to build and deploy docker images; you can use Dockerfiles to create numerous custom images, and then there is the docker-compose command to run several container instances simultaneously.

But wait, there is even more; you can create docker containers that can act as servers and clients, create multiple slots, and scale them; you can run these on various environments and systems. Docker-Swarm clustering empowers you to craft clusters that can be effectively utilised for different services and modules in your project. This highly efficient and reliable approach can help you easily streamline your workflow and achieve your goals.

Would you please allow me to introduce you to Kubernetes? Compared to Docker Swarm, #Kubernetes is a robust and intricate orchestration tool offering self-healing and auto-scaling features right from the start. But this is a topic for some other time.

Kowshik G Y

Digital Marketing Associate | Passionate About Digital Transformation & Audience Engagement

1 年

Register for our latest webinar on Advanced kubernetes concepts and tools.? Registration Link: https://lnkd.in/gnEdUYgw #docker #kubernetes #course #registernow

回复

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

Vineet Kumar的更多文章

社区洞察

其他会员也浏览了