docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RetrieveConfig = retrieveImageConfig

For testing.

Functions

func CreateDockerTarContext

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

func Digest

func Digest(cli client.ImageAPIClient, 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(workspace string, r io.Reader) ([]string, error)

GetDockerfileDependencies parses a dockerfile and returns the full paths of all the source files that the resulting docker image depends on.

func NewImageAPIClient

func NewImageAPIClient() (client.ImageAPIClient, io.Closer, error)

NewImageAPIClient returns a docker client based on the environment variables set. It will "negotiate" the highest possible API version supported by both the client and the server if there is a mismatch.

func NewMinikubeImageAPIClient

func NewMinikubeImageAPIClient() (client.ImageAPIClient, io.Closer, error)

NewMinikubeImageAPIClient returns a docker client using the environment variables provided by minikube.

func RunBuild

func RunBuild(cli client.ImageAPIClient, opts *BuildOptions) error

RunBuild performs a docker build and returns nothing

func RunPush

func RunPush(cli client.ImageAPIClient, ref string, out io.Writer) 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
}

Jump to

Keyboard shortcuts

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