Add --env-file to ctr
Closes #3517 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -64,6 +64,9 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
|
||||
args = context.Args()[2:]
|
||||
)
|
||||
opts = append(opts, oci.WithDefaultSpec(), oci.WithDefaultUnixDevices)
|
||||
if ef := context.String("env-file"); ef != "" {
|
||||
opts = append(opts, oci.WithEnvFile(ef))
|
||||
}
|
||||
opts = append(opts, oci.WithEnv(context.StringSlice("env")))
|
||||
opts = append(opts, withMounts(context))
|
||||
|
||||
|
Reference in New Issue
Block a user