docker

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOutput OutputKey  = "status"
	StreamOutput OutputKey  = "stream"
	Gcloud       AuthHelper = "gcloud"
)

Variables

View Source
var (
	ErrCannotRedeclare = errors.New("cannot be declared more than once")
)

Functions

func BuildImage

func BuildImage(tag, path, dockerfile string) error

func GetAuthConfig

func GetAuthConfig() (map[string]types.AuthConfig, error)

func IsDockerRunning

func IsDockerRunning() (bool, error)

func PullImage

func PullImage(image string) error

func Run

func Run(opts ...RunOpt) error

Types

type AuthHelper

type AuthHelper = string

type OutputKey

type OutputKey string

type RunCommand

type RunCommand interface {
	GetCommand() ([]string, error)
}

type RunConfig

type RunConfig struct {
	Config        *container.Config
	HostConfig    *container.HostConfig
	NetworkConfig *network.NetworkingConfig
	Platform      *specs.Platform
	Name          string
}

type RunOpt

type RunOpt func(*RunConfig) error

func RunWithCommand

func RunWithCommand(cmd []string) RunOpt

func RunWithEntrypoint

func RunWithEntrypoint(entrypoint []string) RunOpt

func RunWithImage

func RunWithImage(image string) RunOpt

func RunWithMounts

func RunWithMounts(mounts []mount.Mount) RunOpt

func RunWithShell

func RunWithShell(shell []string) RunOpt

func RunWithWorkingDir

func RunWithWorkingDir(dir string) RunOpt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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