docker

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

type Docker struct {
	*client.Client
}

Docker docker as image builder

func CreateClient

func CreateClient(ctx context.Context) (*Docker, error)

CreateClient create a docker instance

func (*Docker) BuildImage

func (d *Docker) BuildImage(ctx context.Context, workdir string, name string) error

BuildImage a directory to be a image

func (*Docker) InspectContainer

func (d *Docker) InspectContainer(ctx context.Context, name string, container interface{}) error

InspectContainer inspect a container

func (*Docker) InspectImage

func (d *Docker) InspectImage(ctx context.Context, name string, img interface{}) error

InspectImage inspect a image

func (*Docker) PushImage

func (d *Docker) PushImage(ctx context.Context, name string) (string, error)

PushImage push image to hub.docker.com

func (*Docker) StartContainer

func (d *Docker) StartContainer(ctx context.Context, name string, image string, ports []int32) error

StartContainer create and start a container from given image

func (*Docker) StopContainer

func (d *Docker) StopContainer(ctx context.Context, name string) error

StopContainer stop and remove container

Jump to

Keyboard shortcuts

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