docker

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDockerSocketPath = "/var/run/docker.sock"

Variables

This section is empty.

Functions

func New

func New(id string, cli *provider.DockerClient, opts ...Option) (types.Harness, error)

Types

type HarnessDockerOptions

type HarnessDockerOptions struct {
	ImageRef         name.Reference
	ManagedVolumes   []container.ConfigMount
	Networks         []string
	Mounts           []container.ConfigMount
	HostSocketPath   string
	Envs             provider.Env
	Registries       map[string]*RegistryOpt
	ConfigVolumeName string
}

type Option

type Option func(*HarnessDockerOptions) error

func WithAuthFromKeychain added in v0.0.17

func WithAuthFromKeychain(registry string) Option

func WithAuthFromStatic added in v0.0.17

func WithAuthFromStatic(registry, username, password, auth string) Option

func WithConfigVolumeName added in v0.0.17

func WithConfigVolumeName(configVolumeName string) Option

func WithEnvs

func WithEnvs(env ...provider.Env) Option

func WithHostSocketPath

func WithHostSocketPath(socketPath string) Option

func WithImageRef

func WithImageRef(ref name.Reference) Option

func WithManagedVolumes

func WithManagedVolumes(volumes ...container.ConfigMount) Option

func WithMounts

func WithMounts(mounts ...container.ConfigMount) Option

func WithNetworks

func WithNetworks(networks ...string) Option

type RegistryOpt added in v0.0.17

type RegistryOpt struct {
	Auth *base.RegistryAuthOpt
	Tls  *base.RegistryTlsOpt
}

Jump to

Keyboard shortcuts

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