docker

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrContainerNotFound = errors.New("Container not found")
View Source
var ErrImageNotFound = errors.New("Image not found")
View Source
var ErrNoImagesDeleted = errors.New("No images were deleted")

Functions

func ContainerExists added in v0.0.2

func ContainerExists(ID string) error

func CreateImage

func CreateImage(filePath string, imageName string) error

func CreateNewContainer

func CreateNewContainer(imageName string, address string, port string) (string, error)

CreateNewContainer creates and starts a docker container using an existing image defined by imageName

func DeleteContainer

func DeleteContainer(ID string) error

func DeleteImage

func DeleteImage(imageID string) error

func GetIPAddress added in v0.0.3

func GetIPAddress(containerID string, networkName string) (string, error)

func GetImageIDByTag

func GetImageIDByTag(i Images, inputTag string) (string, error)

func IsContainerRunning added in v0.0.2

func IsContainerRunning(ID string) bool

func ListContainers

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

func ListImages

func ListImages() ([]types.ImageSummary, error)

func PauseContainer added in v0.0.2

func PauseContainer(ID string) error

func StartContainer

func StartContainer(ID string, networkName string) error

func StopContainer

func StopContainer(ID string) error

func StopContainerByImageID

func StopContainerByImageID(imageID string) error

func UnpauseContainer added in v0.0.2

func UnpauseContainer(ID string) error

Types

type Images

type Images []types.ImageSummary

Jump to

Keyboard shortcuts

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