Visualising Basic Concepts of Docker
-
Upload
vishnu-rao -
Category
Technology
-
view
268 -
download
1
Transcript of Visualising Basic Concepts of Docker
Docker &
docker run vishnu
What is Docker ?
What is Docker ?
It’s a Application Delivery Technology.
Terminology Briefing● Docker or Docker Engine
● Docker Host
● Docker Daemon
● Docker Container
Qns: Docker Container = VM ?
Qns: Docker Container = VM ?
Ans: NO
House Apartment ’s
1 - Virtual Machine Many Containers
Motivation● Isolation
● Lightweight when compared to VM
○ Multiple docker containers share the underlying
resources of the docker host.
Terminology Briefing
● Docker Image
● Docker Container
Biggest Motivation:
Its an Application Delivery Mechanism !
Qns: How do we deliver our Apps ?
Qns: How do we deliver our Apps ?
Ans:In docker terms, we create and ship
DOCKER - IMAGE
This is an open Container
This a Manifest for the open container.
The Cargo for your container
Obviously you
declare all this
in the manifest !
Close it , i.e build it - and you have an image.
My Analogy
● Open Container = Docker build directory
● Container Manifest = Docker build File
● The Cargo = The necessary things to run your App
● Properly Closed Container = Properly Built Image
Concept of layers in an Image
Each Box of cargo you add forms a LAYER in an image.
You can add a new LAYER on TOP of the previous layer.
Hint :- stack of pancakes
Docker build -t Manifest.dockerfile
IMAGE now built and ready to be shipped.
Shipping = pushing image to Docker Registry
Now that the Closed Container(IMAGE)
is available,What next ?
Next : Running Multiple containers On ONE Host
Cargo ship (Docker Host) running many containers ...
NOTE:Ships only move in the sea
So do containers.
Life of a container
While running container, it may create new resources like log
files , database files etc.
Life of a container
While running container, it may create new resources like log
files , database files etc.
Once we destroy a container, we LOSE everything.
Life of a container - how to preserve its state ?
So, one can choose to MOUNT directories into the container .
Life of a container - how to preserve its state ?
So, one can choose to MOUNT directories into the container.
The container can write to the mounted dir and when the
container is destroyed, its state is preserved in the mount.
We call them docker volumes
Docker Container - Networking ?
Can i access all the ports of the container ?
Docker Container - Networking ?
Can i access all the ports of the container ?
-> By Default No, you need to explicity expose them.
Docker Container - Networking ?
Can i access all the ports of the container ?
-> By Default No, you need to explicitly expose PORTS.
Does it have an ip address ?
-> it does a have private IP.
More reading ...
https://docs.docker.com/engine/understanding-docker/
https://blog.docker.com/2016/03/containers-are-not-vms/
+ Internet ….
Docker thank you
sweetweet213Jaihind213