diff --git a/diff/apply/apply_linux.go b/diff/apply/apply_linux.go index c36b6090c..bbe9c17d9 100644 --- a/diff/apply/apply_linux.go +++ b/diff/apply/apply_linux.go @@ -26,12 +26,18 @@ import ( "github.com/containerd/containerd/archive" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/mount" + "github.com/opencontainers/runc/libcontainer/system" "github.com/pkg/errors" ) func apply(ctx context.Context, mounts []mount.Mount, r io.Reader) error { switch { case len(mounts) == 1 && mounts[0].Type == "overlay": + // OverlayConvertWhiteout (mknod c 0 0) doesn't work in userns. + // https://github.com/containerd/containerd/issues/3762 + if system.RunningInUserNS() { + break + } path, parents, err := getOverlayPath(mounts[0].Options) if err != nil { if errdefs.IsInvalidArgument(err) {