Day-2: What is Docker Images and Explain in 10 bullet lines?

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

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”