tmpfs mount
A mount that keeps files in memory only; they vanish when the container stops.
In more detail
Use --tmpfs for scratch files or secrets that must never touch disk. It pairs well with a read-only root filesystem, giving the application a writable /tmp and nothing else.
Example
docker run --read-only --tmpfs /tmp myimageRelated terms
- volume — Storage managed by Docker that lives outside any container, so data survives when the container is removed.
- bind mount — Mounting a folder from the host directly into a container, so both see the same files.
- read-only root filesystem — Running a container so that nothing in its root filesystem can be changed, with writable space only where you add it.
Taught in
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers