Docker helps us to easily setup any open source project
Docker mainly useful for the containerization purpose for creating the container for you app
Inside the docker there's 3 thing that works
1. Docker cli:
-docker command line interface
- for running any command of docker ex. docker run , help etc..
Docker Commands:
2. Docker Engine :
Docker cli is the way to interact with docker deamon
3. Docker hub :
-Similar to github where you can find the images of the particular dependencies like node , mongodb
in a github we put our code at Centralized place where we can put the code and other people can also pull that code
when we deploy the to docker hub , that means we are deploying the docker image to docker hub
docker image don't consist of the source code , it has some extra things like file system needed , networking setup
docker hub is also called as registry
registry: the place where we can deploy the image
*Images VS Containers *
*Images : *
-docker images behaves like template from which consistent [ means independent containers that can be run same on different operating system ] container can be created
Images are static , we can perform only read operation
docker images is also different from the virtual machines
images contains the file system , codebase , networking
through image we can bundle our application code and it's dependencies into a package that ready to use with container in runtime
images can create once and run according to need
Containers:
Running images or executing the images is called the container
we can run more than 1 container for the same docker images for auto scaling the application when the application have more traffic
Containers are isolated from the local machine
anything running inside the container can't affect the host
systemcontainers are dynamic nature , means we can perform read and write operation on it.
-
Here we are running the docker container inside that container we are running the index.js file for twice to scale up to match the user demand
- Here you can refer my graph and notes of Excalidraw : https://excalidraw.com/#json=dAVKCWSoSajiNib4tP6Gf,x-7olFhqlo39IquZllHtuA
for more such graph and notes you can refer my Excalidraw Canvas :
Top comments (1)
good to read this, keep sharing ....