container

package
v0.0.0-...-18c6e13 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCheckpoint

func CreateCheckpoint(checkpointOpts types.CheckpointReqOpts) error

CreateCheckpoint create a checkpoint for a container

func CreateContainer

CreateContainer create a container

func GetImageByContainer

func GetImageByContainer(containerID string) (string, error)

GetImageByContainer get image name of container, not directly used

func GetImageByImageID

func GetImageByImageID(imageID string) (string, error)

@deprecated replaced by GetImageByContainer GetImageByImageID get image name

func GetPortBinding

func GetPortBinding(containerID string) error

GetPortBinding get port binding of container

func Inspect

func Inspect(containerID string) (types.ContainerJSON, error)

Inspect get info of container

func ListContainers

func ListContainers(opts types.ContainerListOptions) ([]types.Container, error)

ListContainers ...

func RunContainer

func RunContainer(opts RunOpts) (string, error)

RunContainer run a container

func StartContainer

func StartContainer(opts StartOpts) error

StartContainer start a container with opts

func StopContainer

func StopContainer(ContainerID string, timeout *time.Duration) error

StopContainer stop the container

Types

type RunOpts

type RunOpts struct {
	ImageName     string
	HostPort      string
	ContainerPort string
}

RunOpts ...

type StartOpts

type StartOpts struct {
	ContainerID string
	CStartOpts  types.ContainerStartOptions
}

StartOpts ...

Jump to

Keyboard shortcuts

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