systemd-detect-virt is also handy if present On Sun, 2019-09-15 at 05:52 -0400, Daniel Walsh wrote:
On 9/14/19 5:56 AM, Robert P. J. Day wrote:
dropped into existing project, where all Makefiles do the following test to see if they're running inside docker:
ifneq ($(wildcard /.dockerenv),)
i'm pretty sure that's just asking for trouble, and i've perused a github issue related to that:
https://github.com/containers/libpod/issues/648
so what is the *proper* way to detect if one is running inside a container? the way that seems most reliable is to check /proc/1/sched. thoughts?
rday _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
We provide /run/.containerenv
Or looking for environment $CONTAINER is probably a good way. _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io