Description
e.g., docker run -v /mnt:/mnt:rro,rprivate to make its submounts such as /mnt/usbstorage to be read-only.
The existing ro mounts should remain non-recursive, for compatibility sake.
The "rro" mount type has been supported by runc >= 1.1, on kernel >= 5.12.
The "rro" mount type has to be used in conjunction with rprivate propagation, in order to avoid accidentally having writable submounts.
So, we should also have:
Related:
Fixes:
Description
e.g.,
docker run -v /mnt:/mnt:rro,rprivateto make its submounts such as/mnt/usbstorageto be read-only.The existing
romounts should remain non-recursive, for compatibility sake.The "rro" mount type has been supported by runc >= 1.1, on kernel >= 5.12.
The "rro" mount type has to be used in conjunction with
rprivatepropagation, in order to avoid accidentally having writable submounts.So, we should also have:
rprivatepropagation #44977(Not a hard dependency, as
-v /foo:/bar:rprivatedoes not automatically fall back torslavewhen the propagation is explicitly specified)Related:
nerdctl run -v /foo:/bar:rro,rprivatecontainerd/nerdctl#511Fixes: