dockercommand

package module
v0.0.0-...-e4b6c3d Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2014 License: MIT Imports: 9 Imported by: 0

README

go-dockercommand

Note: This is a work in progress

Go Docker Command is a Go library that provides a fluent interface to manage Docker containers, in the manner of the Docker CLI

We use the great fsouza/go-dockerclient to communicate with the Docker engine.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOptions

type BuildOptions struct {
	Dockerfile string
	Path       string
	Tag        string
}

type Docker

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

func NewDocker

func NewDocker(endpoint string) (*Docker, error)

func (*Docker) Build

func (dock *Docker) Build(options *BuildOptions) error

func (*Docker) Inspect

func (dock *Docker) Inspect(containerID string) (*docker.Container, error)

func (*Docker) Ps

func (dock *Docker) Ps(options *PsOptions) ([]docker.APIContainers, error)

func (*Docker) Rm

func (dock *Docker) Rm(options *RmOptions) error

func (*Docker) Run

func (dock *Docker) Run(options *RunOptions) (string, error)

type PsOptions

type PsOptions struct {
	All    bool
	Size   bool
	Limit  int
	Since  string
	Before string
}

type RmOptions

type RmOptions struct {
	Container []string
	Force     bool
}

type RunOptions

type RunOptions struct {
	Image       string
	Cmd         []string
	VolumeBinds []string
	Detach      bool
	Env         map[string]string
}

Jump to

Keyboard shortcuts

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