mirror of
https://github.com/containers/podman.git
synced 2025-12-09 15:19:35 +08:00
podman: allow to specify the userns to join
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #1145 Approved by: rhatdan
This commit is contained in:
committed by
Atomic Bot
parent
41c7e43b4d
commit
819c807125
@@ -374,7 +374,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
|
||||
}
|
||||
|
||||
usernsMode := container.UsernsMode(c.String("userns"))
|
||||
if !usernsMode.Valid() {
|
||||
if !cc.IsNS(string(usernsMode)) && !usernsMode.Valid() {
|
||||
return nil, errors.Errorf("--userns %q is not valid", c.String("userns"))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user