ctr: support --user for run/create
Signed-off-by: Ye Sijun <junnplus@gmail.com>
This commit is contained in:
@@ -196,6 +196,9 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
if cwd := context.String("cwd"); cwd != "" {
|
||||
opts = append(opts, oci.WithProcessCwd(cwd))
|
||||
}
|
||||
if user := context.String("user"); user != "" {
|
||||
opts = append(opts, oci.WithUser(user), oci.WithAdditionalGIDs(user))
|
||||
}
|
||||
if context.Bool("tty") {
|
||||
opts = append(opts, oci.WithTTY)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user