Documentation ¶
Index ¶
Constants ¶
View Source
const ( PodmanMode = "PODMAN" KubernetesServiceHost = "KUBERNETES_SERVICE_HOST" NomadJobName = "NOMAD_JOB_NAME" )
View Source
const ( // PlatformDockerStandalone represent the Docker platform (Standalone) PlatformDockerStandalone = ContainerPlatform("Docker Standalone") // PlatformDockerSwarm represent the Docker platform (Swarm) PlatformDockerSwarm = ContainerPlatform("Docker Swarm") // PlatformKubernetes represent the Kubernetes platform PlatformKubernetes = ContainerPlatform("Kubernetes") // PlatformPodman represent the Podman platform (Standalone) PlatformPodman = ContainerPlatform("Podman") // PlatformNomad represent the Nomad platform (Standalone) PlatformNomad = ContainerPlatform("Nomad") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerPlatform ¶
type ContainerPlatform string
ContainerPlatform represent the platform on which the container is running (Docker, Kubernetes, Nomad)
func DetermineContainerPlatform ¶
func DetermineContainerPlatform() (ContainerPlatform, error)
DetermineContainerPlatform will check for the existence of the PODMAN_MODE or KUBERNETES_SERVICE_HOST environment variable to determine if the container is running on Podman or inside the Kubernetes platform. Defaults to Docker otherwise.
Click to show internal directories.
Click to hide internal directories.