docker

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 42 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RetrieveImage = retrieveImage

For testing.

Functions

func AddTag added in v0.5.0

func AddTag(src, target string) error

func CreateDockerTarContext

func CreateDockerTarContext(w io.Writer, dockerfilePath, context string) error

func CreateDockerTarGzContext added in v0.4.0

func CreateDockerTarGzContext(w io.Writer, dockerfilePath, context string) error

func Digest

func Digest(ctx context.Context, cli DockerAPIClient, ref string) (string, error)

Digest returns the image digest for a corresponding reference. The digest is of the form sha256:<image_id>

func GetDockerfileDependencies

func GetDockerfileDependencies(dockerfilePath, workspace string) ([]string, error)

func PortsFromDockerfile added in v0.2.0

func PortsFromDockerfile(r io.Reader) ([]string, error)

func RemoteDigest added in v0.5.0

func RemoteDigest(identifier string) (string, error)

func RunBuild

func RunBuild(ctx context.Context, cli DockerAPIClient, opts *BuildOptions) error

RunBuild performs a docker build and returns nothing

func RunPush

func RunPush(ctx context.Context, cli DockerAPIClient, ref string, out io.Writer) error

func StreamDockerMessages added in v0.6.0

func StreamDockerMessages(dst io.Writer, src io.Reader) error

TODO(@r2d4): Make this output much better, this is the bare minimum

func UploadContextToGCS added in v0.5.0

func UploadContextToGCS(ctx context.Context, dockerfilePath, dockerCtx, bucket, objectName string) error

Types

type AuthConfigHelper

type AuthConfigHelper interface {
	GetAuthConfig(registry string) (types.AuthConfig, error)
	GetAllAuthConfigs() (map[string]types.AuthConfig, error)
}

AuthConfigHelper exists for testing purposes since GetAuthConfig shells out to native store helpers. Ideally this shouldn't be public, but the LocalBuilder needs to use it.

var (
	// DefaultAuthHelper is exposed so that other packages can override it for testing
	DefaultAuthHelper AuthConfigHelper
)

type BuildOptions

type BuildOptions struct {
	ImageName   string
	Dockerfile  string
	ContextDir  string
	ProgressBuf io.Writer
	BuildBuf    io.Writer
	BuildArgs   map[string]*string
}

type DockerAPIClient added in v0.3.0

type DockerAPIClient interface {
	client.CommonAPIClient
	io.Closer
}

func NewDockerAPIClient added in v0.3.0

func NewDockerAPIClient() (DockerAPIClient, error)

NewDockerAPIClient guesses the docker client to use based on current kubernetes context.

type DockerfileDepResolver added in v0.4.0

type DockerfileDepResolver struct{}

func (*DockerfileDepResolver) GetDependencies added in v0.4.0

func (d *DockerfileDepResolver) GetDependencies(a *v1alpha2.Artifact) ([]string, error)

Jump to

Keyboard shortcuts

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