sys

package
v0.2.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectContainerID added in v0.2.18

func DetectContainerID() (bool, string)

DetectContainerID detects if the current process is running inside a container and attempts to extract the container ID from cgroup entries. It returns (isContainer, containerID). The containerID may be empty even when a container is detected (e.g., via /.dockerenv or environment variable).

func IsRunningInContainer added in v0.2.7

func IsRunningInContainer() bool

IsRunningInContainer detects if the current process is running inside a container.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL