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 myimage

Related terms

Taught in

References