docker

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: Apache-2.0 Imports: 44 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RetrieveImage = retrieveImage

RetrieveImage is overridden for unit testing

Functions

func AddTag added in v0.5.0

func AddTag(src, target string) error

func CreateDockerTarContext

func CreateDockerTarContext(ctx context.Context, w io.Writer, workspace string, a *latest.DockerArtifact) error

func GetBuildArgs added in v0.11.0

func GetBuildArgs(a *latest.DockerArtifact) []string

GetBuildArgs gives the build args flags for docker build.

func GetDependencies added in v0.7.0

func GetDependencies(ctx context.Context, workspace string, a *latest.DockerArtifact) ([]string, error)

GetDependencies finds the sources dependencies for the given docker artifact. All paths are relative to the workspace.

func NormalizeDockerfilePath added in v0.11.0

func NormalizeDockerfilePath(context, dockerfile string) (string, error)

NormalizeDockerfilePath returns the absolute path to the dockerfile.

func RemoteDigest added in v0.5.0

func RemoteDigest(identifier string) (string, error)

func ValidateDockerfile added in v0.14.0

func ValidateDockerfile(path string) bool

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 BuildResult added in v0.21.0

type BuildResult struct {
	ID string
}

BuildResult gives the information on an image that has been built.

type ImageReference added in v0.7.0

type ImageReference struct {
	BaseName       string
	Tag            string
	FullyQualified bool
}

ImageReference is a parsed image name.

func ParseReference added in v0.7.0

func ParseReference(image string) (*ImageReference, error)

ParseReference parses an image name to a reference.

type LocalDaemon added in v0.21.0

type LocalDaemon interface {
	Close() error
	ServerVersion(ctx context.Context) (types.Version, error)
	ConfigFile(ctx context.Context, image string) (*v1.ConfigFile, error)
	Build(ctx context.Context, out io.Writer, workspace string, a *latest.DockerArtifact, ref string) (string, error)
	Push(ctx context.Context, out io.Writer, ref string) (string, error)
	Pull(ctx context.Context, out io.Writer, ref string) error
	Load(ctx context.Context, out io.Writer, input io.Reader, ref string) (string, error)
	Tag(ctx context.Context, image, ref string) error
	ImageID(ctx context.Context, ref string) (string, error)
}

LocalDaemon talks to a local Docker API.

func NewAPIClient added in v0.8.0

func NewAPIClient() (LocalDaemon, error)

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

func NewLocalDaemon added in v0.21.0

func NewLocalDaemon(apiClient client.CommonAPIClient) LocalDaemon

NewLocalDaemon creates a new LocalDaemon.

type PushResult added in v0.21.0

type PushResult struct {
	Digest string
}

PushResult gives the information on an image that has been pushed.

Jump to

Keyboard shortcuts

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