docker

package
v0.9.0-alpha.16 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDockerInstalled

func CheckDockerInstalled() bool

func CheckDockerRunning

func CheckDockerRunning(ctx context.Context) bool

CheckDockerRunning checks if the docker daemon is running. If not run, fails with: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

func IsErrDockerClientVersionNewerThanDaemon

func IsErrDockerClientVersionNewerThanDaemon(err error) bool

IsErrDockerClientVersionNewerThanDaemon returns true if the docker client version is newer than the daemon version. e.g., "Error response from daemon: client version 1.44 is too new. Maximum supported API version is 1.43"

Types

type DockerContainer

type DockerContainer struct {
	ID           string `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	Image        string `json:"image,omitempty"`
	CreatedAt    int64  `json:"created_at,omitempty"`
	State        string `json:"state,omitempty"`
	PodName      string `json:"pod_name,omitempty"`
	PodNamespace string `json:"pod_namespace,omitempty"`
}

func ListContainers

func ListContainers(ctx context.Context) ([]DockerContainer, error)

ListContainers lists all containers from the docker daemon. If docker daemon is not running, fails with: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

Jump to

Keyboard shortcuts

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