Documentation
¶
Overview ¶
Package selfcontainer detects the Docker container ID of the running process, so Miabi can recognise its own container and refuse to stop or delete it from the admin containers list — which would take the platform offline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detect ¶
func Detect() string
Detect returns the ID of the container the process runs in, or "" when it is not containerized. Resolution order, most to least reliable: MIABI_CONTAINER_ID, /proc/self/mountinfo (Docker bind-mounts /etc/hostname from /var/lib/docker/containers/<id>/), /proc/self/cgroup, hostname.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.