TempRemount iterates through all read-only mounted filesystems, bind-mounts them at dest, and unmounts them from their original source. All mount points underneath ignorePrefixes will not be touched. Some container runtimes such as sysbox-runc will mount in `/lib/modules` read-only. See https://git
(logf log.Func, dest string, ignorePrefixes ...string)
| 35 | // the operation, calling the returned function will make a best-effort attempt to restore |
| 36 | // the original state. |
| 37 | func TempRemount(logf log.Func, dest string, ignorePrefixes ...string) (restore func() error, err error, |
| 38 | ) { |
| 39 | return tempRemount(&realMounter{}, logf, dest, ignorePrefixes...) |
| 40 | } |
| 41 | |
| 42 | func tempRemount(m mounter, logf log.Func, base string, ignorePrefixes ...string) (restore func() error, err error) { |
| 43 | mountInfos, err := m.GetMounts() |