dockersh

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContainerRunCommand

func BuildContainerRunCommand(opts *docker.RunOptions) (string, error)

BuildContainerRunCommand builds the docker run command string from the given options and additional params

func ExecInSystem

func ExecInSystem(execPath string, fullCommand string, logsBuffer *bytes.Buffer, print bool) error

ExecInSystem can exec a command with a full command in system. All logs produced by command would be print to stdout and write into logsBuffer if it is not nil

func ExecInSystemWithParams

func ExecInSystemWithParams(execPath string, params []string, logsBuffer *bytes.Buffer, print bool) error

ExecInSystemWithParams can exec a command with some params in system. All logs produced by command would be print to stdout and write into logsBuffer if it is not nil

Types

type ShellOperator

type ShellOperator struct{}

ShellOperator is an implementation of /pkg/util/docker.Operator interface by using shell commands

func (*ShellOperator) ComposeDown added in v0.9.0

func (op *ShellOperator) ComposeDown() error

func (*ShellOperator) ComposeState added in v0.9.0

func (op *ShellOperator) ComposeState() (map[string]interface{}, error)

func (*ShellOperator) ComposeUp added in v0.9.0

func (op *ShellOperator) ComposeUp() error

func (*ShellOperator) ContainerGetHostname

func (op *ShellOperator) ContainerGetHostname(container string) (string, error)

func (*ShellOperator) ContainerGetPortBinding

func (op *ShellOperator) ContainerGetPortBinding(container string, containerPort uint) (hostPort uint, err error)

func (*ShellOperator) ContainerIfExist

func (op *ShellOperator) ContainerIfExist(containerName string) bool

func (*ShellOperator) ContainerIfRunning

func (op *ShellOperator) ContainerIfRunning(containerName string) bool

func (*ShellOperator) ContainerListMounts

func (op *ShellOperator) ContainerListMounts(containerName string) (docker.Mounts, error)

func (*ShellOperator) ContainerListPortPublishes

func (op *ShellOperator) ContainerListPortPublishes(containerName string) ([]docker.PortPublish, error)

func (*ShellOperator) ContainerRemove

func (op *ShellOperator) ContainerRemove(containerName string) error

func (*ShellOperator) ContainerRun

func (op *ShellOperator) ContainerRun(opts *docker.RunOptions) error

func (*ShellOperator) ContainerStop

func (op *ShellOperator) ContainerStop(containerName string) error

func (*ShellOperator) ImageIfExist

func (op *ShellOperator) ImageIfExist(imageNameWithTag string) bool

func (*ShellOperator) ImagePull

func (op *ShellOperator) ImagePull(imageNameWithTag string) error

func (*ShellOperator) ImageRemove

func (op *ShellOperator) ImageRemove(imageNameWithTag string) error

Jump to

Keyboard shortcuts

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