Add WithEnv and WithMount oci options

Signed-off-by: Paul Knopf <pauldotknopf@gmail.com>
This commit is contained in:
Paul Knopf
2018-01-22 16:19:22 -05:00
parent d5aa7655e2
commit b4c3cd7640
5 changed files with 137 additions and 54 deletions

View File

@@ -61,8 +61,8 @@ func newContainer(ctx gocontext.Context, client *containerd.Client, context *cli
opts = append(opts, oci.WithRootFSReadonly())
}
cOpts = append(cOpts, containerd.WithRuntime(context.String("runtime"), nil))
opts = append(opts, withEnv(context), withMounts(context))
opts = append(opts, oci.WithEnv(context.StringSlice("env")))
opts = append(opts, withMounts(context))
if len(args) > 0 {
opts = append(opts, oci.WithProcessArgs(args...))
}