package mountopts

import "github.com/moby/buildkit/util/rootless/mountopts"

Index

Functions

func FixUp

func FixUp(mounts []mount.Mount) ([]mount.Mount, error)

FixUp is for https://github.com/moby/buildkit/issues/3098

func FixUpOCI

func FixUpOCI(mounts []specs.Mount) ([]specs.Mount, error)

func UnprivilegedMountFlags

func UnprivilegedMountFlags(path string) ([]string, error)

UnprivilegedMountFlags gets the set of mount flags that are set on the mount that contains the given path and are locked by CL_UNPRIVILEGED. This is necessary to ensure that bind-mounting "with options" will not fail with user namespaces, due to kernel restrictions that require user namespace mounts to preserve CL_UNPRIVILEGED locked flags.

From https://github.com/moby/moby/blob/v23.0.1/daemon/oci_linux.go#L430-L460

Source Files

mountopts_linux.go

Version
v0.12.0-rc2
Published
Jul 10, 2023
Platform
linux/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.