summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/spec/spec.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index a2fa169e5..6520940d0 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -458,7 +458,7 @@ func addRlimits(config *CreateConfig, g *generate.Generator) error {
g.AddProcessRlimits("RLIMIT_"+strings.ToUpper(ul.Name), uint64(ul.Hard), uint64(ul.Soft))
}
- if !nofileSet {
+ if !nofileSet && !rootless.IsRootless() {
g.AddProcessRlimits("RLIMIT_NOFILE", 1048576, 1048576)
}