Documentation ¶
Index ¶
- func HealthCheckDockerAPI() error
- type CreateContainerPayload
- type Docker
- func (d Docker) CreateContainer(analysis types.Analysis, image string, cmd string) (string, error)
- func (d Docker) DieContainers() error
- func (d Docker) ImageIsLoaded(image string) bool
- func (d Docker) ListImages() ([]dockerTypes.ImageSummary, error)
- func (d Docker) ListStoppedContainers() ([]Docker, error)
- func (d Docker) PullImage(image string) error
- func (d Docker) ReadOutput() (string, error)
- func (d Docker) ReadOutputStderr() (string, error)
- func (d Docker) RemoveContainer() error
- func (d Docker) RemoveImage(imageID string) ([]dockerTypes.ImageDelete, error)
- func (d Docker) StartContainer() error
- func (d Docker) StopContainer() error
- func (d Docker) WaitContainer(timeOutInSeconds int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheckDockerAPI ¶
func HealthCheckDockerAPI() error
HealthCheckDockerAPI returns true if a 200 status code is received from dockerAddress or false otherwise.
Types ¶
type CreateContainerPayload ¶
type CreateContainerPayload struct { Image string `json:"Image"` Tty bool `json:"Tty,omitempty"` Cmd []string `json:"Cmd"` }
CreateContainerPayload is a struct that represents all data needed to create a container.
type Docker ¶
type Docker struct { CID string `json:"Id"` // contains filtered or unexported fields }
Docker is the docker struct
func (Docker) CreateContainer ¶
CreateContainer creates a new container
func (Docker) DieContainers ¶ added in v0.3.0
DieContainers stops and removes all containers
func (Docker) ImageIsLoaded ¶
ImageIsLoaded returns a bool if a a docker image is loaded or not.
func (Docker) ListImages ¶
func (d Docker) ListImages() ([]dockerTypes.ImageSummary, error)
ListImages returns docker images, like docker image ls.
func (Docker) ListStoppedContainers ¶ added in v0.3.0
ListContainers returns a Docker type list with CIDs of stopped containers
func (Docker) ReadOutput ¶
ReadOutput returns STDOUT of a given containerID.
func (Docker) ReadOutputStderr ¶
ReadOutputStderr returns STDERR of a given containerID.
func (Docker) RemoveContainer ¶ added in v0.3.0
RemoveContainer removes a container by it's CID
func (Docker) RemoveImage ¶
func (d Docker) RemoveImage(imageID string) ([]dockerTypes.ImageDelete, error)
RemoveImage removes an image.
func (Docker) StartContainer ¶
StartContainer starts a container and returns its error.
func (Docker) StopContainer ¶ added in v0.3.0
StopContainer stops an active container by it's CID
func (Docker) WaitContainer ¶
WaitContainer returns when container finishes executing cmd.