Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDockerInstalled ¶
func CheckDockerInstalled() bool
func CheckDockerRunning ¶
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 ¶
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?"
Click to show internal directories.
Click to hide internal directories.