-
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
RFE: touch a file to make it easy to tell we're containerized #529
Comments
This seems like an easy enough thing to do |
but /.containerenv or some such? |
That sounds OK too. I find |
/run/.containerenv would be fine by me too. My main thing was to not include the d-word.... |
Is there anything we should look into including in the file that would be helpful, besides its existence? Podman version, potentially? |
Hmm, how about we just leave it empty for now? Adding things later on if we really want would be a mostly backwards compatible change. |
Will this work with readonly containers? Should the file be read-only, should we make sure the file does not end up in an image? Putting the file in /run, would be my preferred mechanism to. Adding the version of the tool that created the file inside buildah-1.13 or podman-0.3.3 |
If we add a file, like dockerd does, but give it a different name, then we're not reducing the amount of work required for anyone. systemd suggests setting |
@baude suggested an environment variable would be good to set in addition to the file. It would be easy enough to add both. |
Yes systemd like container=podman or container=buildah to be set. |
Fixed in #533 |
/kind feature
Description
AFAICT, there isn't a file like
/.dockerenv
to make it easy to tell we're in a container. Can we add something like/run/podman-container
?The text was updated successfully, but these errors were encountered: