
Docker
Docker is containerization technology which isolate a process from rest of the computer environment and execute it as such.
I’ll be sharing my understanding of Docker.
To understand docker let’s look at how programs are executed in computer let’s say we have written a program.

the program will be saved on the hard disk. computer load this program into the ram to be executed by computer CPU. and this program when being executed by CPU is called a process. A process is an instance of a program.

The Operating system kernel provides API to the program access resources. Kernel manage the memory, CPU time for process.
API are set of well defined method used by two different application to interact with each other.
Which are used by program to access resources. Every operating system, has there own sets of defined API. That’s why windows application do not work in Linux cause the underlying API of Linux kernel is different from the windows kernel API.

Docker provides containerization of the running process by including all dependency and library with the runtime,these are the files required by your program to execute properly container has it’s own file system.

Docker not just manage container but also network, data volumes and image.
Image: A snapshot of a disk which contain the runtime environment for an application, third party library environment variable, cut down OS.
To create an image we use Docker file which is written in YAML.

Each container even based on the same image have it’s own independent copy of filesystem to work with. So if the container is in an isolated process with it’s own File system how does it preserve data or any change that are done by the program.
for this purpose docker uses volumes to preserve the state and changes made by the containerize program. Volume is a filesystem that can be mounted by container and is made available to the application running the container
What is mounted? A mounted disk means operating system and read and written to or both.
Thank you for reading.