docker

package
v0.2.28 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindStages

func FindStages(content string) []string

func ParseDockerignore

func ParseDockerignore(dir, dockerfile string) ([]string, error)

func SlugifyTag added in v0.0.23

func SlugifyTag(tag string) string

func Tag

func Tag(registry, image, tag string) string

Types

type Authenticator added in v0.2.2

type Authenticator interface {
	auth.AuthServer
	session.Attachable
}

func NewAuthenticator added in v0.2.2

func NewAuthenticator(registryHost string, authConfig registry.AuthConfig) Authenticator

type Client

type Client interface {
	RegistryLogin(ctx context.Context, auth registry.AuthConfig) (registry.AuthenticateOKBody, error)
	ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
	ImagePush(ctx context.Context, image string, options types.ImagePushOptions) (io.ReadCloser, error)
	DialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error)
	BuildCancel(ctx context.Context, id string) error
}

func DefaultClient added in v0.2.27

func DefaultClient() (Client, error)

type MockDocker

type MockDocker struct {
	Username      string
	Password      string
	ServerAddress string
	BuildContext  []io.Reader
	BuildOptions  []types.ImageBuildOptions
	Images        []string
	LoginError    error
	BuildCount    int
	BuildError    []error
	PushError     error
	PushOutput    *string
	BrokenOutput  bool
	ResponseError error
	ResponseBody  io.Reader
}

func (*MockDocker) BuildCancel added in v0.2.1

func (m *MockDocker) BuildCancel(ctx context.Context, id string) error

func (*MockDocker) DialHijack added in v0.2.1

func (m *MockDocker) DialHijack(context.Context, string, string, map[string][]string) (net.Conn, error)

func (*MockDocker) ImageBuild

func (m *MockDocker) ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)

func (*MockDocker) ImagePush

func (m *MockDocker) ImagePush(ctx context.Context, image string, options types.ImagePushOptions) (io.ReadCloser, error)

func (*MockDocker) RegistryLogin

Jump to

Keyboard shortcuts

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