-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
container=podman environment variable #11836
Comments
It's a feature for https://systemd.io/CONTAINER_INTERFACE/
|
There shouldn't be any redundant traces of host platform type for security reasons. Podman (1) should not assume that container executes any special configuration, i.e. systemd and (2) should not force things that are redundant (no flag to disable this env var in docs). This env var is set even with --systemd=false... |
See Docker uses |
Mentioned discussion does not say anything about requirement of putting
If docker were perfect, nobody would care about podman ;) |
I think the original suggestion was: |
Mentioned discussion does not say anything about requirement of putting /.dockerenv, /run/.containerenv, container=podman or other stuff like this in container. Just don't force such things in podman. If backward compatibility will be required add |
This is not going to change; it's an established part of our interface at this point. Allowing programs in the container (e.g. systemd) to identify not just that they are in a container, but what kind of containerization is in use, can be essential for proper functioning. |
We could consider a --noleak option, though to prevent this leak of information. I am not sure of the value of this though. I is pretty easy to know that you are inside of a container, especially if /proc/1 does not point to an init system. I guess there is some value in knowing you were launched by different container engines. Podman, Docker, Buildah, Containerd, CRI-O. |
Don't make bad guys life easier. |
|
Interested in opening a PR to add a --paranoid flag? |
I don’t think “noleak”/“paranoid” mode is implementable. Even when
|
It does:
Why do you think so? |
it is enough to look at the mount table to understand it is a tool based on containers/storage:
I think it would be nice to have a way to unset an env variable, but |
I think a |
There is more optional stuff that should be removed so it's better to implement more general flag for all to avoid syntax mess IHMO. |
I am fine with --noleak, and then explicitly explain what it does. |
A friendly reminder that this issue had no activity for 30 days. |
Podman adds a few environment variables by default, and currently there is no way to get rid of them from your container. This option will allow you to specify which defaults you don't want. --unsetenv-all will remove all default environment variables. Default environment variables can come from podman builtin, containers.conf or from the container image. Fixes: containers#11836 Signed-off-by: Daniel J Walsh <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman run
addscontainer=podman
to environment in container; this info should not be present there for security reasons (don't make bad guys life easier); if one really need to pass it to container, may use --env explicitly.Steps to reproduce the issue:
Run container
podman run -it bash
Execute
set
Describe the results you received:
container=podman
in set outputDescribe the results you expected:
No podman traces.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
The text was updated successfully, but these errors were encountered: