New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment passing behavior differes from docker #3648
Comments
@jwhonce can you please take a look at this one? |
@JoshuaWatt Do you have a script/container that relies on this? BTW I am fine with the Docker version, or throwing an error, or the podman version. But if Docker works this way it is probably best that we mimic it. |
@rhatdan I've been working on adding podman support to our containerized build system (https://github.com/garmin/pyrex) that was previously Docker-only. Podman is appealing because it plugs one of the major security holes in the system. For the most part, podman has been a drop in replacement (which is nice). We can work around this issue because we have control over how podman/docker is invoked, so we can manually check if the environment variable is set before passing it as an argument, but it would be nice if we didn't have to do that and they behaved the same. |
@QiWang19 PTAL |
close containers#3648 podman create and podman run do not set --env value if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env value if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
close containers#3648 podman create and podman run do not set --env variable if the environment is not present with a value Signed-off-by: Qi Wang <qiwan@redhat.com>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Passing environment variables using the form
-e VAR
(without assigning a value) differs from the docker behaviour. In docker, the variable will only be passed if set in the parent shell, where as podman always passes the variable, assigning it an empty value if not present in the parent shell.Steps to reproduce the issue:
-e VAR
) and notice that is set in the parent containerDescribe the results you received:
A variable that is not set in the parent shell is present in the containers environment:
Describe the results you expected:
The variable should not be set in the container if not set in the parent shell:
Example from docker:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: