diff options
Diffstat (limited to 'cmd/podman/shared/create.go')
-rw-r--r-- | cmd/podman/shared/create.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index 0ce578bef..8968f10e8 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -101,7 +101,7 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod. if err != nil { return nil, nil, err } - imageData, err = newImage.Inspect(ctx) + imageData, err = newImage.InspectNoSize(ctx) if err != nil { return nil, nil, err } @@ -477,7 +477,9 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod. // // Precedence order (higher index wins): // 1) env-host, 2) image data, 3) env-file, 4) env - var env map[string]string + env := map[string]string{ + "container": "podman", + } // Start with env-host if c.Bool("env-host") { @@ -485,14 +487,14 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod. if err != nil { return nil, errors.Wrap(err, "error parsing host environment variables") } - env = osEnv + env = envLib.Join(env, osEnv) } // Image data overrides any previous variables if data != nil { configEnv, err := envLib.ParseSlice(data.Config.Env) if err != nil { - return nil, errors.Wrap(err, "error pasing image environment variables") + return nil, errors.Wrap(err, "error passing image environment variables") } env = envLib.Join(env, configEnv) } |