Help us shape the future of Go! Take the 2026 Go Developer Survey

docker

package
v0.0.186 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDockerDaemon = errors.New("Docker daemon must be running to perform this action")

ErrDockerDaemon - Docker daemon needs to be running error

View Source
var ErrNoBuildpackBuilder = errors.New("No buildpack builder")

ErrNoBuildpackBuilder - Unable to find Buildpack builder

View Source
var ErrNoDockerfile = errors.New("Project does not contain a Dockerfile and has not set a CNB builder, builtin builder or selected an image")

ErrNoDockerfile - No dockerfile or builder or builtin or image specified error

Functions

func RegistryAuth added in v0.0.117

func RegistryAuth(token string) types.AuthConfig

func ResolveDockerfile added in v0.0.110

func ResolveDockerfile(cwd string) string

ResolveDockerfile - Resolve the location of the dockerfile, allowing for upper and lowercase naming

func WaitForDaemon added in v0.0.186

func WaitForDaemon(ctx context.Context, client *dockerclient.Client) error

Types

type BuildOperation added in v0.0.164

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

func NewBuildOperation added in v0.0.164

func NewBuildOperation(ctx context.Context, cmdCtx *cmdctx.CmdContext) (*BuildOperation, error)

func (*BuildOperation) BuildWithDocker added in v0.0.164

func (op *BuildOperation) BuildWithDocker(cmdCtx *cmdctx.CmdContext, contextDir string, dockerfilePath string, buildArgs map[string]string) (*Image, error)

BuildWithDocker - Run a Docker Build operation reporting back via the command context

func (*BuildOperation) BuildWithPack added in v0.0.164

func (op *BuildOperation) BuildWithPack(cmdCtx *cmdctx.CmdContext, buildArgs map[string]string) (*Image, error)

BuildWithPack - Perform a Docker build using a Buildpack (buildpack.io)

func (*BuildOperation) CleanDeploymentTags added in v0.0.164

func (op *BuildOperation) CleanDeploymentTags(cmdCtx *cmdctx.CmdContext)

func (*BuildOperation) LocalDockerAvailable added in v0.0.164

func (op *BuildOperation) LocalDockerAvailable() bool

func (*BuildOperation) LocalOnly added in v0.0.164

func (op *BuildOperation) LocalOnly() bool

func (*BuildOperation) PushImage added in v0.0.164

func (op *BuildOperation) PushImage(cmdCtx *cmdctx.CmdContext, image Image) error

PushImage - Push the Image (where?)

func (*BuildOperation) RemoteOnly added in v0.0.164

func (op *BuildOperation) RemoteOnly() bool

func (*BuildOperation) ResolveImageLocally added in v0.0.164

func (op *BuildOperation) ResolveImageLocally(ctx context.Context, cmdCtx *cmdctx.CmdContext, imageRef string) (*Image, error)

type DeployOperation

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

func NewDeployOperation

func NewDeployOperation(ctx context.Context, cmdCtx *cmdctx.CmdContext) (*DeployOperation, error)

func (*DeployOperation) AppName

func (op *DeployOperation) AppName() string

func (*DeployOperation) Deploy added in v0.0.103

func (op *DeployOperation) Deploy(imageRef string, strategy DeploymentStrategy) (*api.Release, error)

func (*DeployOperation) ValidateConfig

func (op *DeployOperation) ValidateConfig() (*api.AppConfig, error)

type DeploymentStrategy added in v0.0.110

type DeploymentStrategy string
const (
	CanaryDeploymentStrategy    DeploymentStrategy = "canary"
	RollingDeploymentStrategy   DeploymentStrategy = "rolling"
	ImmediateDeploymentStrategy DeploymentStrategy = "immediate"
	DefaultDeploymentStrategy   DeploymentStrategy = ""
)

func ParseDeploymentStrategy added in v0.0.110

func ParseDeploymentStrategy(val string) (DeploymentStrategy, error)

type DockerClient

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

func NewDockerClient

func NewDockerClient() (*DockerClient, error)

func (*DockerClient) BuildImage

func (c *DockerClient) BuildImage(ctx context.Context, contextDir string, tar io.Reader, tag string, buildArgs map[string]*string, out io.Writer) (*types.ImageSummary, error)

func (*DockerClient) Check

func (c *DockerClient) Check(ctx context.Context) error

func (*DockerClient) Client added in v0.0.117

func (c *DockerClient) Client() *client.Client

func (*DockerClient) DeleteDeploymentImages

func (c *DockerClient) DeleteDeploymentImages(ctx context.Context, tag string) error

func (*DockerClient) Info added in v0.0.171

func (c *DockerClient) Info(ctx context.Context) (types.Info, error)

func (*DockerClient) PullImage

func (c *DockerClient) PullImage(ctx context.Context, imageName string, out io.Writer) error

func (*DockerClient) PushImage

func (c *DockerClient) PushImage(ctx context.Context, imageName string, out io.Writer) error

func (*DockerClient) ResolveImage

func (c *DockerClient) ResolveImage(ctx context.Context, imageName string) (*types.ImageSummary, error)

func (*DockerClient) TagImage

func (c *DockerClient) TagImage(ctx context.Context, sourceRef, tag string) error

type Image added in v0.0.103

type Image struct {
	ID   string
	Tag  string
	Size int64
}

Image - A type to hold information about a Docker image, including ID, Tag and Size

Jump to

Keyboard shortcuts

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