mirror of
https://github.com/containers/podman.git
synced 2025-12-18 14:29:21 +08:00
podman: split env variables in env and overrides
There are three different priorities for applying env variables: 1) environment/config file environment variables 2) image's config 3) user overrides (--env) The third kind are known to the client, while the default config and image's config is handled by the backend. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
1d3cdf9a46
commit
99bdafba99
@@ -177,7 +177,6 @@ var _ = Describe("Podman build", func() {
|
||||
})
|
||||
|
||||
It("podman Test PATH in built image", func() {
|
||||
Skip(v2fail) // Run error - we don't set data from the image (i.e., PATH) yet
|
||||
path := "/tmp:/bin:/usr/bin:/usr/sbin"
|
||||
session := podmanTest.PodmanNoCache([]string{
|
||||
"build", "-f", "build/basicalpine/Containerfile.path", "-t", "test-path",
|
||||
|
||||
@@ -91,7 +91,8 @@ var _ = Describe("Podman run", func() {
|
||||
Expect(match).Should(BeTrue())
|
||||
})
|
||||
|
||||
It("podman run --host-env environment test", func() {
|
||||
It("podman run --env-host environment test", func() {
|
||||
SkipIfRemote()
|
||||
env := append(os.Environ(), "FOO=BAR")
|
||||
session := podmanTest.PodmanAsUser([]string{"run", "--rm", "--env-host", ALPINE, "/bin/printenv", "FOO"}, 0, 0, "", env)
|
||||
|
||||
@@ -109,6 +110,7 @@ var _ = Describe("Podman run", func() {
|
||||
})
|
||||
|
||||
It("podman run --http-proxy test", func() {
|
||||
SkipIfRemote()
|
||||
os.Setenv("http_proxy", "1.2.3.4")
|
||||
session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "printenv", "http_proxy"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
||||
Reference in New Issue
Block a user