Expand description
Helpers for interacting with containers at runtime.
Constants§
- OSTREE_
BOOTED - The relative path to the stamp file which signals this is an ostree-booted system.
- V0_
REPO_ 🔒CONFIG - V1_
REPO_ 🔒CONFIG
Functions§
- is_
bare_ split_ xattrs - Returns
trueif the current root filesystem has an ostree repository inbare-split-xattrsmode. This will be the case in a running ostree-native container. - is_
ostree_ booted_ in - Returns true if the target root appears to have been booted via ostree.
- is_
ostree_ container - Returns
trueif the current booted filesystem appears to be an ostree-native container. - open_
optional 🔒 - ostree_
booted - Returns true if the system appears to have been booted via ostree. This accesses global state in /run.
- require_
ostree_ container - Returns an error unless the current filesystem is an ostree-based container
- running_
in_ container - Attempts to detect if the current process is running inside a container.
This looks for the
containerenvironment 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.