docker

package
v0.0.0-...-86e4b03 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New() (*Client, error)

func (*Client) ContainerCreate

func (c *Client) ContainerCreate(options ContainerOptions) (id string, err error)

ContainerCreate creates and starts the Docker container.

func (*Client) ContainerKill

func (c *Client) ContainerKill(id string) (err error)

ContainerKill kills the Docker container.

func (*Client) ContainerRemove

func (c *Client) ContainerRemove(id string) (err error)

ContainerRemove removes the Docker containter.

func (*Client) ContainerStart

func (c *Client) ContainerStart(id string) (err error)

ContainerStart starts the container with the id.

func (*Client) ContainerStop

func (c *Client) ContainerStop(id string) (err error)

ContainerStop stops the Docker containter.

func (*Client) ImagePull

func (c *Client) ImagePull(tag string) (err error)

ImagePull pulls the Docker image.

func (*Client) NetworkCreate

func (c *Client) NetworkCreate(name string) (id string, err error)

NetworkCreate creates Docker network.

func (*Client) NetworkRemove

func (c *Client) NetworkRemove(id string) (err error)

NetworkRemove removes Docker network.

type ContainerOptions

type ContainerOptions struct {
	Image    string
	Env      []string
	HostIP   string
	Ports    [][]int
	Volumes  []string
	Hostname string
	Command  string
	Name     string
	Network  string
}

ContainerOptions contains the options to create the container with.

Jump to

Keyboard shortcuts

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