diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index b959b947f5..4fdb7f81b1 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -1411,9 +1411,9 @@ required for VPN, without it containers need to be run with the **--network=host Environment variables within containers can be set using multiple different options, in the following order of precedence (later entries override earlier entries): -- **--env-host**: Host environment of the process executing Podman is added. -- **--http-proxy**: By default, several environment variables will be passed in from the host, such as **http_proxy** and **no_proxy**. See **--http-proxy** for details. - Container image: Any environment variables specified in the container image. +- **--http-proxy**: By default, several environment variables will be passed in from the host, such as **http_proxy** and **no_proxy**. See **--http-proxy** for details. +- **--env-host**: Host environment of the process executing Podman is added. - **--env-file**: Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry. - **--env**: Any environment variables specified will override previous settings. diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 84d3adec18..accdc93152 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -109,6 +109,7 @@ EOF s_env1=$(random_string 20) s_env2=$(random_string 25) s_env3=$(random_string 30) + s_env4=$(random_string 40) # Label name: make sure it begins with a letter! jq barfs if you # try to ask it for '.foo.xyz', i.e. any string beginning with digit @@ -118,11 +119,17 @@ EOF # Command to run on container startup with no args cat >$tmpdir/mycmd <$PODMAN_TMPDIR/env-file <$tmpdir/Containerfile </_data/symlink: ENOENT + run_podman run --rm build_test stat -c'%u:%g:%N' /a/b/c/badsymlink + is "$output" "0:0:'/a/b/c/badsymlink' -> '/no/such/nonesuch'" \ + "bad symlink to nonexistent file is chowned and preserved" + + run_podman run --rm build_test stat -c'%u:%g:%N' /a/b/c/goodsymlink + is "$output" "0:0:'/a/b/c/goodsymlink' -> '/bin/mydefaultcmd'" \ + "good symlink to existing file is chowned and preserved" + + run_podman run --rm build_test stat -c'%u:%g' /bin/mydefaultcmd + is "$output" "2:3" "target of symlink is not chowned" + + run_podman run --rm build_test stat -c'%u:%g:%N' /a/b/c/myfile + is "$output" "0:0:/a/b/c/myfile" "file in volume is chowned to root" + # Clean up run_podman rmi -f build_test } diff --git a/test/system/helpers.t b/test/system/helpers.t index a022f11c47..bee09505ce 100755 --- a/test/system/helpers.t +++ b/test/system/helpers.t @@ -6,7 +6,7 @@ # anything if we have to mess with them. # -source $(dirname $0)/helpers.bash +source "$(dirname $0)"/helpers.bash die() { echo "$(basename $0): $*" >&2