docker

package
v0.0.0-...-3c80049 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContainer

func NewContainer(ID, name, image string, ports nat.PortMap, envVars containers.EnvVars, cli *client.Client) containers.Container

NewContainer initializes a new containers.Container implementation using Docker.

Types

type CreateContainerInput

type CreateContainerInput struct {
	Name    string
	Image   string
	Ports   nat.PortMap
	EnvVars containers.EnvVars
}

CreateContainerInput is used to group a set of required fields when creating a dockerContainer.

type Docker

type Docker interface {
	Pull(ctx context.Context, image string) error
	Create(ctx context.Context, input CreateContainerInput) (containers.Container, error)
	Remove(ctx context.Context, id string) error
}

Docker represents a docker client.

func NewClient

func NewClient() (Docker, error)

NewClient initializes a new Docker client.

Jump to

Keyboard shortcuts

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