diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-03-03 15:29:13 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-03-04 17:07:47 +0100 |
commit | 6d2d6898f8b31d9a3e15cf2d2923f098433d9a58 (patch) | |
tree | aae76c12afe486cd1cc7ea21f92c244b13057f53 /cmd | |
parent | 34baea814ba6af58e7f7b65622fd0fb7b838fbf7 (diff) | |
download | podman-6d2d6898f8b31d9a3e15cf2d2923f098433d9a58.tar.gz podman-6d2d6898f8b31d9a3e15cf2d2923f098433d9a58.tar.bz2 podman-6d2d6898f8b31d9a3e15cf2d2923f098433d9a58.zip |
env: don't set "container" env
Leave setting the "container" variable to consumers of pkg/env.
Podman is now hard-setting it to "podman" while "libpod" will
set it internally to "libpod" if it's unset.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/shared/create.go | 6 |
1 files changed, 4 insertions, 2 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 |