docker

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2016 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigDirDest = "/var/lib/rancher/etc"
)

Variables

View Source
var (
	Parent = Container{
		Name:       "parent",
		Networking: true,
		Command:    []string{"parent"},
		Ports: []string{
			"18080:8080/tcp",
			"2181:12181/tcp",
			"2888:12888/tcp",
			"3888:13888/tcp",
			"6379:16379/tcp",
		},
		Labels: map[string]string{
			"io.rancher.container.network": "true",
		},
		DeleteLabeled: map[string]string{
			"io.rancher.ha.container": "true",
		},
		OpenStdin: true,
		RestartPolicy: container.RestartPolicy{
			Name: "always",
		},
	}
)

Functions

func GetImageAndEnv

func GetImageAndEnv() (string, map[string]string, bool)

func ParseEnv

func ParseEnv(env []string) map[string]string

func ToEnv

func ToEnv(env ...map[string]string) []string

Types

type Container

type Container struct {
	Name          string
	Image         string
	Command       []string
	Env           map[string]string
	Labels        map[string]string
	DeleteLabeled map[string]string
	Networking    bool
	Ports         []string
	RestartPolicy container.RestartPolicy
	OpenStdin     bool
	Privileged    bool
	Volumes       map[string]string
	CheckRunning  string
}

type Docker

type Docker struct {
	Cli *client.Client
	// contains filtered or unexported fields
}

func New

func New(configDir, prefix, image string, portMap map[string]int, defaultEnv map[string]string) (*Docker, error)

func (*Docker) Delete

func (d *Docker) Delete(name string) error

func (*Docker) GetBridgeIP

func (d *Docker) GetBridgeIP() (string, error)

func (*Docker) Launch

func (d *Docker) Launch(container Container) error

func (*Docker) Name

func (d *Docker) Name() (string, error)

Jump to

Keyboard shortcuts

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