bind

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// NoBindOption is an option which, if present in a Mount structure's
	// options list, will cause SetupIntermediateMountNamespace to not
	// redirect it through a bind mount.
	NoBindOption = "nobuildahbind"
)

Variables

This section is empty.

Functions

func SetupIntermediateMountNamespace

func SetupIntermediateMountNamespace(spec *specs.Spec, bundlePath string) (unmountAll func() error, err error)

SetupIntermediateMountNamespace creates a new mount namespace and bind mounts all bind-mount sources into a subdirectory of bundlePath that can only be reached by the root user of the container's user namespace, except for Mounts which include the NoBindOption option in their options list. The NoBindOption will then merely be removed.

func UnmountMountpoints

func UnmountMountpoints(mountpoint string, mountpointsToRemove []string) error

UnmountMountpoints unmounts the given mountpoints and anything that's hanging off of them, rather aggressively. If a mountpoint also appears in the mountpointsToRemove slice, the mountpoints are removed after they are unmounted.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL