OverlayFS is a union file system that stacks multiple directory and file layers to construct a single directory tree. As a Docker storage driver, OverlayFS stacks image layers marked as read-only with a writable container layer to make images and containers appear as a single filesystem, allowing file sharing between containers using the same image layers. OverlayFS consists of a read-only lower layer, a read-write upper layer, and an overlay that merges the two, allowing files to be read from or written to the upper layer without knowing about the underlying layer structure.