docker

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImage

func BuildImage(tags []string, dockerFile string) (types.ImageBuildResponse, error)

BuildImage builds the docker image.

func ContainerExists

func ContainerExists(name string) (string, bool)

ContainerExists finds container by name and if exists returns id.

func Init

func Init(config *config.Registry)

Init initializes global variables

func ListImages

func ListImages() []types.ImageSummary

ListImages returns all images.

func PullImage

func PullImage(image string, config *config.Registry) error

PullImage pulls image from the registry.

func PushImage

func PushImage(tag string) (io.ReadCloser, error)

PushImage pushes image to the registry.

func RunContainer

func RunContainer(name, image string, commands [][]string, env []string, dir string, logch chan<- []byte) error

RunContainer runs container.

func StopContainer

func StopContainer(name string) error

StopContainer stops the container.

func StreamImageEvents

func StreamImageEvents(out chan<- jsonmessage.JSONMessage, events io.ReadCloser)

StreamImageEvents streams output of an operation on image to a given out channel passed as a parameter.

Types

type ImageBuildOutput

type ImageBuildOutput struct {
	Stream string `json:"stream"`
}

ImageBuildOutput defines log output when building image.

Jump to

Keyboard shortcuts

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