Files
moby/daemon/snapshotter/mount_unix.go
Derek McGowan 0aa8fe0bf9 Update to containerd v2.0.2, buildkit v0.19.0-rc2
Update buildkit version to commit which uses 2.0

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-01-15 14:09:30 +01:00

21 lines
415 B
Go

//go:build !windows
package snapshotter
import (
"github.com/containerd/containerd/v2/core/mount"
"github.com/moby/sys/mountinfo"
"golang.org/x/sys/unix"
)
// isMounted parses /proc/mountinfo to check whether the specified path
// is mounted.
func isMounted(path string) bool {
m, _ := mountinfo.Mounted(path)
return m
}
func unmount(target string) error {
return mount.Unmount(target, unix.MNT_DETACH)
}