Documentation ¶
Index ¶
- func GetContainerName(serviceName string) string
- func GetImageName(serviceName string) string
- func HandleOutput(body io.ReadCloser, censored []string, writer io.Writer)
- type Container
- func (c *Container) Build(secrets []string, authConfigs map[string]types.AuthConfig, ...) error
- func (c *Container) ConfigureNetwork(networkID string) error
- func (c *Container) Create() error
- func (c *Container) Get(secrets []string, authConfigs map[string]types.AuthConfig, ...) error
- func (c *Container) Pull(secrets []string, authConfigs map[string]types.AuthConfig, ...) error
- func (c *Container) Run(wg *sync.WaitGroup, secrets []string, firstStoppedSvcCh chan string) error
- func (c *Container) Stop() error
- type ContainerManager
- func (cM *ContainerManager) AddContainer(container *Container) error
- func (cM *ContainerManager) Execute(secrets []string) error
- func (cM *ContainerManager) IsAllSuccessful() bool
- func (cM *ContainerManager) IsRunning() bool
- func (cM *ContainerManager) IsSuccessful() bool
- func (cM *ContainerManager) Stop() error
- type ImageBuilder
- type ImagePusher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContainerName ¶
GetContainerName returns the vci normalised container name
func GetImageName ¶
GetImageName returns the vci normalised image name
func HandleOutput ¶
func HandleOutput(body io.ReadCloser, censored []string, writer io.Writer)
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container represents a runnable container
func NewContainer ¶
func NewContainer( writer io.Writer, name string, image string, build *v3.DockerComposeServiceBuild, containerConfig *container.Config, hostConfig *container.HostConfig, networkAliases []string, ) *Container
NewContainer returns a new runnable container with the given parameters
func (*Container) Build ¶
func (c *Container) Build( secrets []string, authConfigs map[string]types.AuthConfig, addressAuthToken map[string]string, ) error
Build builds the container
func (*Container) ConfigureNetwork ¶
ConfigureNetwork updates the container's endpoint in the network to match its aliases
func (*Container) Get ¶
func (c *Container) Get(secrets []string, authConfigs map[string]types.AuthConfig, authTokens map[string]string) error
Get will ensure that the container exists inside Docker by building or pulling it
func (*Container) Pull ¶
func (c *Container) Pull( secrets []string, authConfigs map[string]types.AuthConfig, addressAuthToken map[string]string, ) error
Pull pulls the container
type ContainerManager ¶
type ContainerManager struct {
// contains filtered or unexported fields
}
ContainerManager manages a set of containers
func NewContainerManager ¶
func NewContainerManager( id string, registryAuthConfigs map[string]types.AuthConfig, registryAuthTokens map[string]string, ) *ContainerManager
NewContainerManager returns a new container manager
func (*ContainerManager) AddContainer ¶
func (cM *ContainerManager) AddContainer(container *Container) error
AddContainer adds a container for the container manager to manager
func (*ContainerManager) Execute ¶
func (cM *ContainerManager) Execute(secrets []string) error
Execute runs the containers
func (*ContainerManager) IsAllSuccessful ¶
func (cM *ContainerManager) IsAllSuccessful() bool
IsAllSuccessful returns whether or not all of the services exited successfully
func (*ContainerManager) IsRunning ¶
func (cM *ContainerManager) IsRunning() bool
IsRunning returns whether or not the containers are running
func (*ContainerManager) IsSuccessful ¶
func (cM *ContainerManager) IsSuccessful() bool
IsSuccessful returns whether or not the first stopped service exited successfully
func (*ContainerManager) Stop ¶
func (cM *ContainerManager) Stop() error
Stop interrupts running containers
type ImageBuilder ¶
type ImageBuilder struct {
// contains filtered or unexported fields
}
ImageBuilder represents a stoppable Docker image builder
func NewImageBuilder ¶
func NewImageBuilder() *ImageBuilder
NewImageBuilder returns a new Docker image builder
func (*ImageBuilder) Build ¶
func (iB *ImageBuilder) Build( writer io.Writer, secrets []string, buildContext string, dockerfile string, tags []string, authConfigs map[string]types.AuthConfig, ) error
Build builds a Docker image with the given parameters
func (*ImageBuilder) IsRunning ¶
func (iB *ImageBuilder) IsRunning() bool
IsRunning returns whether or not the builder is running
type ImagePusher ¶
type ImagePusher struct {
// contains filtered or unexported fields
}
Represents a stoppable Docker image pusher
func NewImagePusher ¶
func NewImagePusher() *ImagePusher
NewImagePusher returns a new Docker image pusher