Interview Prep/Docker/Volumes & Bind Mounts

What is `tmpfs` mount used for?

BeginnerConceptVolumes & Bind Mounts
Answer

Ephemeral, memory-backed storage for secrets or scratch space, with optional size and mode.

docker run --tmpfs /run:rw,noexec,nosuid,size=64m myapp
docker run --mount type=tmpfs,dst=/tmp,tmpfs-size=100m myapp

Combined with --read-only, it gives a read-only root with only specific writable paths.

All Docker questions Roadmap: Docker & containers

More on Volumes & Bind Mounts