How Does an Overlay Filesystem Work

An Overlay Filesystem is used by Docker and other container technologies to combine multiple directories in one view.

There are three parts to it -

  1. Lower
  2. Upper
  3. Mount

Any changes to the mount directory are really written to the upper directory by copying the changed file to the upper from lower. This way lower is never changed. Deletions are written to the upper directory as metadata.

Subscribe to NordLetter

A weekly newsletter on living in Finland.

UPDATED