ctr run: add --cwd

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2017-10-03 07:22:05 +00:00
parent f6d88927d5
commit b26e2e781c
4 changed files with 18 additions and 1 deletions

View File

@@ -107,6 +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))
}
if context.Bool("tty") {
opts = append(opts, withTTY())
}