Introduction
Sometimes you want to share files or folders with a container but prevent the container from changing them. Mounting a volume as read-only lets the container use the files without risking accidental changes.
When you want to share configuration files with a container but keep them safe from modification.
When you run a container that needs to read data files but should not write or delete them.
When multiple containers share the same data but only one container should be allowed to modify it.
When you want to protect important scripts or binaries inside a container from being changed.
When you want to debug or inspect files inside a container without risking changes.