docker

package
v1.0.1-0...-0a61d5e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerManager

type ContainerManager struct {
	// contains filtered or unexported fields
}

func Container

func Container(name string, options ...ContainerOption) (*ContainerManager, error)

func (*ContainerManager) Create

func (container *ContainerManager) Create(args ...string) error

func (*ContainerManager) Exists

func (container *ContainerManager) Exists() (bool, error)

func (*ContainerManager) Kill

func (container *ContainerManager) Kill() error

func (*ContainerManager) Remove

func (container *ContainerManager) Remove() error

func (*ContainerManager) Run

func (container *ContainerManager) Run(args ...string) error

func (*ContainerManager) RunNonInteractive

func (container *ContainerManager) RunNonInteractive(args ...string) error

func (*ContainerManager) RunNonInteractiveCaptureOutput

func (container *ContainerManager) RunNonInteractiveCaptureOutput(lineToCapture int, args ...string) ([]string, error)

func (*ContainerManager) Running

func (container *ContainerManager) Running() (bool, error)

func (*ContainerManager) Start

func (container *ContainerManager) Start(args ...string) error

func (*ContainerManager) Stop

func (container *ContainerManager) Stop() error

func (*ContainerManager) String

func (container *ContainerManager) String() string

type ContainerOption

type ContainerOption func(container *ContainerManager) error

func WithDefaultNetwork

func WithDefaultNetwork() ContainerOption

func WithEnv

func WithEnv(name, value string) ContainerOption

func WithImage

func WithImage(image *ImageManager) ContainerOption

func WithLocalUser

func WithLocalUser() ContainerOption

func WithNetwork

func WithNetwork(network *NetworkManager) ContainerOption

func WithNetworkAlias

func WithNetworkAlias(networkAlias string) ContainerOption

func WithPersistence

func WithPersistence() ContainerOption

func WithPorts

func WithPorts(desc string) ContainerOption

func WithSharedGcloud

func WithSharedGcloud() ContainerOption

func WithSharedGopath

func WithSharedGopath() ContainerOption

func WithSharedSSHSocket

func WithSharedSSHSocket() ContainerOption

func WithSharedWorkspace

func WithSharedWorkspace() ContainerOption

func WithStandardHome

func WithStandardHome() ContainerOption

func WithVolume

func WithVolume(source, inside string) ContainerOption

func WithWorkdir

func WithWorkdir(workdir string) ContainerOption

func WithoutTTY

func WithoutTTY() ContainerOption

type ImageManager

type ImageManager struct {
	// contains filtered or unexported fields
}

func Image

func Image(repo, name string) *ImageManager

func (*ImageManager) Build

func (image *ImageManager) Build(context, dockerfile string) error

func (*ImageManager) LastBuiltID

func (image *ImageManager) LastBuiltID() (string, error)

func (*ImageManager) Pull

func (image *ImageManager) Pull() error

func (*ImageManager) Push

func (image *ImageManager) Push(tag string) error

func (*ImageManager) String

func (image *ImageManager) String() string

type NetworkManager

type NetworkManager struct {
	// contains filtered or unexported fields
}

func Network

func Network(name string) *NetworkManager

func (*NetworkManager) Create

func (network *NetworkManager) Create() error

func (*NetworkManager) CreateIfNotExists

func (network *NetworkManager) CreateIfNotExists() error

func (*NetworkManager) Exists

func (network *NetworkManager) Exists() (bool, error)

func (*NetworkManager) String

func (network *NetworkManager) String() string

type Watcher

type Watcher struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher() *Watcher

func (*Watcher) Run

func (watcher *Watcher) Run(serviceName string, container *ContainerManager)

func (*Watcher) Stop

func (watcher *Watcher) Stop(serviceName string)

func (*Watcher) StopAll

func (watcher *Watcher) StopAll() error

Jump to

Keyboard shortcuts

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