docker

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

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 GetImageIDByTag

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

func ListContainers

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

func ListImages

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

func StartContainer

func StartContainer(ID string) error

func StopContainer

func StopContainer(ID string) error

func StopContainerByImageID

func StopContainerByImageID(imageID 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