dockerutil

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatastaxDns = []string{"10.100.6.66", "10.100.6.67"}

Internal datastax DNS addresses to use for distros (like Alpine) that do not query DNS servers in order.

Functions

This section is empty.

Types

type Container

type Container struct {
	Id           string `json:"ID"`
	Image        string `json:"Image"`
	Command      string `json:"Command"`
	CreatedAt    string `json:"CreatedAt"`
	RunningFor   string `json:"RunningFor"`
	Status       string `json:"Status"`
	Size         string `json:"Size"`
	Names        string `json:"Names"`
	Labels       string `json:"Labels"`
	Mounts       string `json:"Mounts"`
	Networks     string `json:"Networks"`
	Ports        string `json:"Ports"`
	LocalVolumes string `json:"LocalVolumes"`
}

func GetAllContainersPanic

func GetAllContainersPanic() []Container

type DockerCmd

type DockerCmd struct {
	Args      []string
	ConfigDir string
	Input     string
	Env       map[string]string
}

func Build

func Build(contextDir string, targetStage string, dockerFilePath string, namesAndTags []string, buildArgs []string) DockerCmd

func Exec

func Exec(containerId string, env []string, privileged bool, user string, workDir string, exec []string) DockerCmd

func FromArgs

func FromArgs(args []string) DockerCmd

func FromArgsInput

func FromArgsInput(args []string, in string) DockerCmd

func Login

func Login(configDir string, user string, pw string, repo string) DockerCmd

func LsContainers

func LsContainers(format string) DockerCmd

func Push

func Push(tag string) DockerCmd

func Run

func Run(imageName string, volumes []string, dnsAddrs []string, env []string, runArgs []string, execArgs []string) DockerCmd

func Tag

func Tag(src string, target string) DockerCmd

func (DockerCmd) Exec

func (cmd DockerCmd) Exec() error

func (DockerCmd) ExecV

func (cmd DockerCmd) ExecV() error

func (DockerCmd) ExecVPanic

func (cmd DockerCmd) ExecVPanic()

func (DockerCmd) Output

func (cmd DockerCmd) Output() (string, error)

func (DockerCmd) OutputPanic

func (cmd DockerCmd) OutputPanic() string

func (DockerCmd) ToCliArgs

func (cmd DockerCmd) ToCliArgs() []string

func (DockerCmd) WithCfg

func (cmd DockerCmd) WithCfg(cfgDir string) DockerCmd

func (DockerCmd) WithInput

func (cmd DockerCmd) WithInput(in string) DockerCmd

Jump to

Keyboard shortcuts

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