Docker Run
When executing the docker run command
You can run a container from a locally stored Docker image
If the image does not exist on the system, it is pulled from an online registry
image pull
When an image is pulled, the
layersare stored independentlyWhen running a container, these layers are
stackedin order andmountedat a specific locationBy default, the layers belonging to the image are
read-onlyand never changeOn top of them, a final
container-specific writable layeris added, and allchangesthat occur in the container are saved to this layer
Running a container
When running a container, a clean layer is placed on top of the image's topmost layer
No matter how many containers are running, they do not affect each other because the layer where actual
writesoccur isseparatedIn other words, every container has its own
unique writable area, which becomes the topmost layer and does not affect any of the lower layers
Last updated