What is a layer and when is one created?
BeginnerConceptImages, Layers & Storage Drivers
Answer
A layer is a tarball of filesystem changes (adds, modifications, deletions) relative to the layer below. In classic Dockerfiles, RUN, COPY and ADD create filesystem layers; ENV, CMD, LABEL, EXPOSE, WORKDIR and USER only add metadata (empty layers in history).
More on Images, Layers & Storage Drivers
What is a Docker image made of?BeginnerWhat is a union filesystem / OverlayFS?IntermediateWhat is copy-on-write (CoW) in containers?IntermediateWhy does deleting a file in a later `RUN` not shrink the image?IntermediateWhat storage drivers does Docker support and which is default?IntermediateWhat is the containerd image store and how does it differ from the classic graph driver store?Advanced