-
Notifications
You must be signed in to change notification settings - Fork 223
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
NAME and VERSION leak into toolbox container env #188
Comments
Yeah, those variables are exported by Podman. It always felt odd that they aren't namespaced. I wonder if Docker does the same, and so it's done for compatibility. |
I wish I could transfer this to @juhp could you please (re)file this against |
Oh wait, they actually come from the Dockerfile for the |
They are mandated by the Fedora guidelines. |
On closer reading, it doesn't look like the guidelines actually require them, but they are part of the example Dockerfile snippets. |
So from a quick look at OSBS it seems that these labels are used to populate some data in koji post build. I don't think we can remove them. I ll look into more details next week if there is a work around. |
Thanks for clarifying that, @cverna ! |
@cverna confirmed in |
@debarshiray, I guess we could unset the env vars when the container is being initialized. That way we keep them in the Dockerfiles but they will not cause problems during runtime. |
@debarshiray Can you clarify why exactly are they required? |
The
We could somehow unset the variables right before spawning the interactive shell inside the container. However, that would deepen the voodoo that we perform when launching the shell. A cleaner alternative might be to block the environment variables from getting leaked into the container from the image, but I don't see an obvious way to do that. |
As @cverna mentioned, they are needed by the Fedora build system.
I don't think you need them in non-Fedora images. |
Thanks for the answer. |
Closing. We can revisit this once the Fedora build system no longer needs |
@debarshiray I might be wrong on this but by looking at the guidelines, looks like there is a requirement for the right labels to be present by fedora build system and not the env vars themeselves ?
Could the env vars in Containerfile be converted to ARGS instead or change them to |
Just now @travier brought this up in containers/docs#15 Unfortunately, I am not an expert in Fedora's OCI image building pipeline. I |
Note that there can be only one ARG per line. Otherwise, the build may fail with some build systems. eg., Fedora's [1], which uses Docker, not Podman. Only the images for currently maintained Fedoras (ie., 36, 37, 38 & 39) were updated. [1] https://koji.fedoraproject.org/koji/taskinfo?taskID=98150241 containers#188
I noticed that envvar for
ENV NAME=fedora-toolbox VERSION=30
leak into the toolbox environment.I am not sure if this is desirable: eg NAME affects changelog entry generation in Emacs rpm-spec-mode. And probably having VERSION in the container is not that useful either.
The text was updated successfully, but these errors were encountered: