omni::extras::isRunningInContainer

Defined in omni/extras/ContainerHelper.h

inline bool omni::extras::isRunningInContainer()

Attempts to detect whether this process is running inside a container.

Remark

This detects if the calling process is running inside a container. This is done by checking for certain files or their contents that are known (and documented) to be modified by Docker. Note that this currently only supports detecting Docker and LXC containers.

Returns

true if this process is running inside a container. Returns false otherwise.