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(a)lists.podman.io
To unsubscribe send an email to podman-leave(a)lists.podman.io
We provide /run/.containerenv
Or looking for environment $CONTAINER is probably a good way.