15 Sep
2019
15 Sep
'19
6:52 p.m.
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.