mirror of
https://github.com/docker/cli.git
synced 2026-01-16 20:22:36 +03:00
If a container is read-only, also set /proc, /sys, & /dev to read-only. This should apply to both privileged and unprivileged containers. Note that when /dev is read-only, device files may still be written to. This change will simply prevent the device paths from being modified, or performing mknod of new devices within the /dev path. Tests are included for all cases. Also adds a test to ensure that /dev/pts is always mounted read/write, even in the case of a read-write rootfs. The kernel restricts writes here naturally and bad things will happen if we mount it ro. Signed-off-by: Eric Windisch <eric@windisch.us> Upstream-commit: 5400d8873f730e6099d29af49fe45931665c3b49 Component: engine