whiteout file

A marker in a higher layer that says a file from a lower layer has been deleted.

In more detail

Layers can only add, never remove, so deletion is recorded as a special whiteout entry. The original bytes stay in the lower layer and anyone who pulls the image can extract them. That is why removing a password in a later Dockerfile instruction does not remove it from the image.

Related terms

Taught in

References