Member-only story
Layers of Docker Image101 explained
Docker images are built from a set of instructions written in a Dockerfile. Each instruction in the Dockerfile adds a new “layer” to the image, with each layer representing a change to the image, or a difference from the layer before it. This layered approach is one of the key features of Docker, and it enables much of Docker’s functionality.

From your dockerfile, the layers of command are not modifiable. Then each container will have its own writable layer. This writable layer is often referred to as the container’s “read/write layer” or “container layer.” It allows any modifications made within the container to be isolated and stored separately from the underlying image.

For instance, if there are three commends like below
FROM ubuntu
RUN dd if=/dev/zero of=/root/file1.txt bs=1M count=10
RUN dd if=/dev/zero of=/root/file2.txt bs=1M count=10
- The first line will create the Ubuntu base image: 70MB
- The second layer will add the files with 10MB: A total: 80MB
- The third layer will add the files with 10MB: A total: 90MB