docker

package
v2.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	RegistryURL string
	ImageName   string
	ImageTag    string
	// contains filtered or unexported fields
}

Builder holds the necessary information to build and push docker images

func NewBuilder

func NewBuilder(client client.CommonAPIClient, registryURL, imageName, imageTag string) (*Builder, error)

NewBuilder creates a new docker Builder instance

func (*Builder) Authenticate

func (b *Builder) Authenticate(user, password string, checkCredentialsStore bool) (*types.AuthConfig, error)

Authenticate authenticates the client with a remote registry

func (*Builder) BuildImage

func (b *Builder) BuildImage(contextPath, dockerfilePath string, options *types.ImageBuildOptions) error

BuildImage builds a dockerimage with the docker cli contextPath is the absolute path to the context path dockerfilePath is the absolute path to the dockerfile WITHIN the contextPath

func (*Builder) PushImage

func (b *Builder) PushImage() error

PushImage pushes an image to the specified registry

Jump to

Keyboard shortcuts

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