Help us shape the future of Go! Take the 2026 Go Developer Survey

dockermachine

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDockerMachineExists is returned if a Docker machine you are trying to create already exists
	ErrDockerMachineExists = errors.New("Docker machine exists")

	// ErrDockerMachineNotAvailable is returned if the docker-machine command is not available in the PATH
	ErrDockerMachineNotAvailable = errors.New("docker-machine not available")
)

Functions

func Client

func Client(name string) (*docker.Client, *dockerclient.Client, error)

Client returns a Docker client for the given Docker machine

func ErrDockerMachineExec

func ErrDockerMachineExec(cmd string, cause error) error

ErrDockerMachineExec is an error that occurred while executing the docker-machine command

func Exists

func Exists(name string) bool

Exists returns true if a Docker machine exists

func IP

func IP(name string) (string, error)

IP returns the IP address of the Docker machine

func IsAvailable

func IsAvailable() bool

IsAvailable returns true if the docker-machine executable can be found in the PATH

func IsRunning

func IsRunning(name string) bool

IsRunning returns true if a Docker machine is running

func Start

func Start(name string) error

Start starts up an existing Docker machine

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder can be used to create a new Docker machine on the local system

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a Docker machine Builder object used to create a Docker machine

func (*Builder) Create

func (b *Builder) Create() error

Create creates a new Docker machine

func (*Builder) Memory

func (b *Builder) Memory(mem int) *Builder

Memory sets the amount of memory (in MB) to give a Docker machine when creating it

func (*Builder) Name

func (b *Builder) Name(name string) *Builder

Name sets the name of the Docker machine to build

func (*Builder) Processors

func (b *Builder) Processors(proc int) *Builder

Processors sets the number of processors to give a Docker machine when creating it

Jump to

Keyboard shortcuts

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