From cdb7f23d21fa49c8ff1edfe3bfbd94d1550f550b Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Thu, 10 May 2018 12:17:37 +0900 Subject: [PATCH] main: add condition to isRootless() Signed-off-by: Akihiro Suda --- utils_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils_linux.go b/utils_linux.go index 2b7ddd584..719ede638 100644 --- a/utils_linux.go +++ b/utils_linux.go @@ -234,7 +234,7 @@ func isRootless(context *cli.Context) (bool, error) { // So we use system.GetParentNSeuid() here. // // TODO(AkihiroSuda): how to support nested userns? - return system.GetParentNSeuid() != 0, nil + return system.GetParentNSeuid() != 0 || system.RunningInUserNS(), nil } func createContainer(context *cli.Context, id string, spec *specs.Spec) (libcontainer.Container, error) {