docker

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

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

Docker is a wrapper for docker SDK

func GetDockerInstance

func GetDockerInstance() *Docker

GetDockerInstance gets docker instance

func (*Docker) CopyTo added in v1.8.1

func (d *Docker) CopyTo(container string, sourcePath string, dstPath string) (err error)

CopyTo syncs data into docker container

func (*Docker) Exec added in v1.8.1

func (d *Docker) Exec(container string, cnf *types.ExecConfig, ca cliApp) (status int, err error)

Exec run command using docker api

func (*Docker) GetClient

func (d *Docker) GetClient() *client.Client

GetClient gets docker client

func (*Docker) GetContanerList

func (d *Docker) GetContanerList() ([]string, error)

GetContanerList get container list

func (*Docker) InitClient

func (d *Docker) InitClient() error

InitClient gets docker client

func (*Docker) Ping

func (d *Docker) Ping() (types.Ping, error)

Ping checks the docker instance state

func (*Docker) Run

func (d *Docker) Run(cmd string) (err error)

Run starts docker service

func (*Docker) Stat

func (d *Docker) Stat() (string, error)

Stat gets docker instance API version

func (*Docker) StopContainers

func (d *Docker) StopContainers() func([]string) error

StopContainers stop containers by filter

Jump to

Keyboard shortcuts

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