docker

package
v0.0.0-...-8a157a1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerAgent

type DockerAgent struct {
	// contains filtered or unexported fields
}

DockerAgent models the docker agent and contains the docker client and configuration

func NewDockerAgent

func NewDockerAgent(endpoint, apiversion string) (*DockerAgent, error)

NewDockerAgent creates new docker agent based on an endpoint and a API version

func NewDockerAgentFromEnv

func NewDockerAgentFromEnv() (*DockerAgent, error)

NewDockerAgentFromEnv returns a new docker agent based on the detected docker engine on the system

func (*DockerAgent) BuildStation

func (a *DockerAgent) BuildStation(imageID string, config agent.StationConfig) error

func (*DockerAgent) CreateStationContainer

func (a *DockerAgent) CreateStationContainer(config agent.StationConfig) error

CreateStationContainer creates a new container on the docker runtime based on a station config

func (*DockerAgent) DeleteImage

func (a *DockerAgent) DeleteImage(imageID string) error

DeleteImage deletes an image specified by a imageID

func (*DockerAgent) DestroyStationContainer

func (a *DockerAgent) DestroyStationContainer(containerID string) error

DestroyStationContainer deletes an existing station container by a given id

func (*DockerAgent) DownloadImage

func (a *DockerAgent) DownloadImage(imageID string) error

DownloadImage downloads an image from the official Docker Registry

func (*DockerAgent) ImagePresent

func (a *DockerAgent) ImagePresent(imageID string) (bool, error)

ImagePresent checks if an image is present in the underlying image store (local docker imagedb) and returns true if yes (false if not).

func (*DockerAgent) RunStationContainer

func (a *DockerAgent) RunStationContainer(containerID string, quiet bool) (io.ReadCloser, error)

RunStationContainer runs an existing station container by a given container id. If the quiet flag is false it will return a io.ReadCloser for reading the containers outputs.

Jump to

Keyboard shortcuts

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