docker

package
v0.0.0-...-1ae8171 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImage

func BuildImage(ctx context.Context, dockerClient *client.Client, image Image, outputOptions OutputOptions) error

func BuildImageAsync

func BuildImageAsync(ctx context.Context, dockerClient *client.Client, image Image, errCh chan<- error, outputOptions OutputOptions)

func CreateNetwork

func CreateNetwork(ctx context.Context, cli *client.Client, network NetworkConfig) error

func CreateProtocolEnv

func CreateProtocolEnv(env ProtocolEnv) ([]string, error)

func ListContainers

func ListContainers(ctx context.Context, cli *client.Client, label string) ([]types.Container, error)

func RemoveContainers

func RemoveContainers(ctx context.Context, cli *client.Client, label string) error

func RemoveNetworks

func RemoveNetworks(ctx context.Context, cli *client.Client, label string) error

func StartContainer

func StartContainer(ctx context.Context, cli *client.Client, config ContainerConfig) (string, error)

func StopContainers

func StopContainers(ctx context.Context, cli *client.Client, label string) ([]types.Container, error)

Types

type ContainerConfig

type ContainerConfig struct {
	Image      string
	Name       string
	Network    string
	User       string
	Env        []string
	Binds      []string
	Cmd        []string
	Labels     map[string]string
	ExtraHosts []string
}

type Image

type Image struct {
	Path   string
	Tags   []string
	Labels map[string]string
}

func (Image) TagsLastPartWithoutVersion

func (i Image) TagsLastPartWithoutVersion() []string

func (Image) TagsWithoutVersion

func (i Image) TagsWithoutVersion() []string

type NetworkConfig

type NetworkConfig struct {
	Name   string
	Labels map[string]string
}

type OutputOptions

type OutputOptions struct {
	ShowOnlyProgress bool         // If true, only the progress bar will be printed
	PrintFn          func(string) // If not nil, this function will be used to print the output
}

type ProtocolEnv

type ProtocolEnv struct {
	Valaccount  string
	RpcAddress  string
	RestAddress string
	Host        string
	PoolId      uint64
	Debug       bool

	StoragePriv    string
	RequestBackoff uint64
	Cache          string
	Metrics        bool
	MetricsPort    uint64
	ChainId        string
}

Jump to

Keyboard shortcuts

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