summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/shared/create.go6
-rw-r--r--pkg/env/env.go7
2 files changed, 7 insertions, 6 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 0ce578bef..08d32df18 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -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,7 +487,7 @@ 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
diff --git a/pkg/env/env.go b/pkg/env/env.go
index 9c0ee79db..c6a1a0d28 100644
--- a/pkg/env/env.go
+++ b/pkg/env/env.go
@@ -12,11 +12,10 @@ import (
"github.com/pkg/errors"
)
-// DefaultEnvVariables set $PATH, $TERM and $container.
+// DefaultEnvVariables sets $PATH and $TERM.
var DefaultEnvVariables = map[string]string{
- "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
- "TERM": "xterm",
- "container": "podman",
+ "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+ "TERM": "xterm",
}
const whiteSpaces = " \t"