writable layer
The thin layer on top of an image where a running container writes its changes.
In more detail
Every container gets its own writable layer, so two containers from one image do not see each other writes. docker diff lists what is in it. It is deleted with the container, which is why data that must survive belongs in a volume, not in the writable layer.
Related terms
- layer — One read-only slice of an image that records the files a single build step added, changed or deleted.
- copy on write — A rule where a shared file is only copied at the moment someone changes it.
- volume — Storage managed by Docker that lives outside any container, so data survives when the container is removed.
- docker diff — Lists the files a container has added (A), changed (C) or deleted (D) compared with its image.
- ephemeral — Temporary: made to be thrown away, with nothing kept afterwards.
Taught in
- Runtime Anomaly Detection with Falco & eBPF — Cloud Security & DevSecOps Engineering
- Union Filesystems, Images And Writable Layers — Docker Architecture & Production Containers
- Run, Stop, Restart And Remove A Container — Docker Architecture & Production Containers
- Run The Spine Service And Publish Its Port — Docker Architecture & Production Containers
- ARG, ENV, LABEL, EXPOSE And VOLUME — Docker Architecture & Production Containers
- Ephemeral Filesystems And Named Volumes — Docker Architecture & Production Containers
- Bind Mounts, Permissions And Backups — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers