docker

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

Docker

Docker Object for smartcontract

Documentation

Index

Constants

View Source
const (
	DefaultImageName = "golang"
	DefaultImageTag  = "1.9"
)

Variables

This section is empty.

Functions

func CloseContainer added in v0.1.1

func CloseContainer(id string) error

func CreateContainer added in v0.2.0

func CreateContainer(dockerImage Image, dir string, port string) (container.ContainerCreateCreatedBody, error)

func GetLocalIPAddressFromContainer added in v0.1.1

func GetLocalIPAddressFromContainer(containerID string) (string, error)

func HasImage

func HasImage(name string) (bool, error)

func PullImage

func PullImage(imageName string) error

func StartContainer

func StartContainer(containerBody container.ContainerCreateCreatedBody) error

Types

type Docker

type Docker interface {
	CreateContainerWithCellCode(dockerImage Image, dir string, shPath string, port string) (container.ContainerCreateCreatedBody, error)
	StartContainer(containerBody container.ContainerCreateCreatedBody) error
	GetUsingPorts() ([]Port, error)
}

type Image

type Image struct {
	Name string
	Tag  string
}

func (Image) GetFullName added in v0.1.1

func (dc Image) GetFullName() string

type Port added in v0.1.1

type Port struct {
	// Host IP address that the container's port is mapped to
	IP string

	// Port on the container
	PrivatePort int

	// Port exposed on the host
	PublicPort int
}

func GetUsingPorts added in v0.1.1

func GetUsingPorts() ([]Port, error)

todo : create test case

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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