pub fn running_in_container() -> boolExpand description
Attempts to detect if the current process is running inside a container.
This looks for the container environment variable or the presence
of Docker or podman’s more generic /run/.containerenv.
This is a best-effort function, as there is not a 100% reliable way
to determine this.