Interview Prep/Docker/Volumes & Bind Mounts

What does `--read-only` do?

IntermediateConceptVolumes & Bind Mounts
Answer

It mounts the container's root filesystem read-only, so writes fail with "Read-only file system". Apps that need scratch space must use volumes or --tmpfs for /tmp, /run, caches. It blocks many persistence techniques after a compromise.

All Docker questions Roadmap: Docker & containers

More on Volumes & Bind Mounts