ctr run: add --cwd
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
@@ -107,7 +107,9 @@ func newContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
if len(args) > 0 {
|
||||
opts = append(opts, containerd.WithProcessArgs(args...))
|
||||
}
|
||||
|
||||
if cwd := context.String("cwd"); cwd != "" {
|
||||
opts = append(opts, containerd.WithProcessCwd(cwd))
|
||||
}
|
||||
return client.NewContainer(ctx, id,
|
||||
containerd.WithNewSpec(opts...),
|
||||
containerd.WithContainerLabels(labels),
|
||||
|
||||
Reference in New Issue
Block a user