Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
Docker image is a collection of file system (Root FS, USER FS and APP FS)
One copy of Docker image get attached to each container created from the image
We can create multiple containers from same image
docker image made up of file system layered over each other i.e Layer-n(image n)….. –> Layer1(image 1) –> Layer 0 (image 0)
Layer 0 in the docker image is base image and requires root file system
Higher layers always win when there is conflicts in Layers
Image layering is accomplished through Union Mounts
All layers are read only except top layers
If we create a container from an image all layers will be merged to create a new layer which is writable
This merge layer will attach to Mount to user
There are types of layers in Image (meta layer and data layer)
- META LAYER – META INFO OF LAYER/IMAGE –> Stored under /var/lib/docker/image
- DATA LAYER – META INFO OF LAYER/IMAGE –> Stored under /var/lib/docker/overlay2
We can create new image from a container using “docker commit -a “user” -m “message” imagename”.
This will also create new layer and can be verified using “docker history imagename”