Documentation
¶
Index ¶
- func AddMaskedPathsForDump(next types.Dump) types.Dump
- func AddMaskedPathsForRestore(next types.Restore) types.Restore
- func AddMountsForDump(next types.Dump) types.Dump
- func AddMountsForRestore(next types.Restore) types.Restore
- func GetCgroupMounts(m *configs.Mount) ([]*configs.Mount, error)
- func IsPathInPrefixList(path string, prefix []string) bool
- func MountRootDirForRestore(next types.Restore) types.Restore
- func SecureJoin(rootfs, path string) string
- func SetupMountsForRestore(next types.Restore) types.Restore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCgroupMounts ¶
lifted from libcontainer
func IsPathInPrefixList ¶
IsPathInPrefixList is a small function for CRIU restore to make sure mountpoints, which are on a tmpfs, are not created in the roofs.
func MountRootDirForRestore ¶
CRIU has a few requirements for a root directory: * it must be a mount point * its parent must not be overmounted c.config.Rootfs is bind-mounted to a temporary directory to satisfy these requirements.
func SecureJoin ¶ added in v0.9.238
Ensures the path is within the rootfs and returns the path relative to the rootfs
func SetupMountsForRestore ¶
Tries to set up the rootfs of the container to be restored in the same way runc does it for initial container creation. Even for a read-only rootfs container runc modifies the rootfs to add mountpoints which do not exist. This function also creates missing mountpoints as long as they are not on top of a tmpfs, as CRIU will restore tmpfs content anyway.
Types ¶
This section is empty.