diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-12 08:40:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 08:40:44 -0500 |
commit | 64b86d004ebd7db0b2bc352475505050be0f8591 (patch) | |
tree | cc0328d6d64b3ac15604c1da2c7a3ed71167c478 /pkg | |
parent | 5575c7be2023d0709432b12b60124168c6956c8a (diff) | |
parent | 1c1e670d40826bed50ea43c197d1944018263738 (diff) | |
download | podman-64b86d004ebd7db0b2bc352475505050be0f8591.tar.gz podman-64b86d004ebd7db0b2bc352475505050be0f8591.tar.bz2 podman-64b86d004ebd7db0b2bc352475505050be0f8591.zip |
Merge pull request #8905 from rhatdan/proxy
Use HTTPProxy settings from containers.conf
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/container.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go index c771e8bc8..2feb1d3b2 100644 --- a/pkg/specgen/generate/container.go +++ b/pkg/specgen/generate/container.go @@ -100,15 +100,9 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat if err != nil { return nil, err } - // First transform the os env into a map. We need it for the labels later in - // any case. - osEnv, err := envLib.ParseSlice(os.Environ()) - if err != nil { - return nil, errors.Wrap(err, "error parsing host environment variables") - } // Get Default Environment from containers.conf - defaultEnvs, err := envLib.ParseSlice(rtc.GetDefaultEnv()) + defaultEnvs, err := envLib.ParseSlice(rtc.GetDefaultEnvEx(s.EnvHost, s.HTTPProxy)) if err != nil { return nil, errors.Wrap(err, "error parsing fields in containers.conf") } @@ -133,6 +127,12 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat defaultEnvs = envLib.Join(defaultEnvs, envs) } + // First transform the os env into a map. We need it for the labels later in + // any case. + osEnv, err := envLib.ParseSlice(os.Environ()) + if err != nil { + return nil, errors.Wrap(err, "error parsing host environment variables") + } // Caller Specified defaults if s.EnvHost { defaultEnvs = envLib.Join(defaultEnvs, osEnv) |