Categorygithub.com/xplorfin/docker-utils
modulepackage
0.15.0
Repository: https://github.com/xplorfin/docker-utils.git
Documentation: pkg.go.dev

# README

Coverage Status Renovate enabled Build status Build status Go Report Card

What is this?

This is a helper library for interacting with docker by entropy, particularly in continuous integration workflows. It provides a canonical way to create volumes, containers, images, etc and tear them down.

# Functions

FilterByLabels creates filters.Args based on a set of labels.
NewDockerClient creates a new Client and initializes it with a sessionId.

# Constants

ContainerCreated indicates a container has been created this is the status after container create see: https://docs.docker.com/engine/reference/commandline/container_create/ for details.
ContainerDead is a container that cannot be restarted see: https://git.io/JqV6W.
ContainerExited indicates the command run in the container has exited.
ContainerPaused indicates a container is paused and is not available see: https://docs.docker.com/engine/reference/commandline/container_pause/.
ContainerRemoving is a container that is in the process of being removed see: https://docs.docker.com/engine/reference/commandline/rm/.
ContainerRestarting indicates a container is in the process of restarting and is not available see: https://docs.docker.com/engine/reference/commandline/container_restart/.
ContainerRunning indicates a command inside a container is running see: https://docs.docker.com/engine/reference/commandline/container_run/.
ContainerUnknown is a container status that is unknown.
Driver defines the supported volume driver by docker-utils docker provides a number of different volume drivers for interacting with persistent disks.

# Structs

Client contains context information for the current session to allow easy teardown at the end of the session.
ExecResult gets the result of a executed docker command.

# Type aliases

ContainerStatus defines constants for container statuses in docker the standard docker library requires us to make string comparisons that are wrapped here to make comparators easier to use.