docker

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExecDriverName is name of exec-driver
	ExecDriverName = "docker"
	// DefaultSrcVolume is the default source path inside the container
	DefaultSrcVolume = "/src"
	// SettingName is the name of section of settings
	SettingName = "docker"
	// Dockerfile is default name of Dockerfile
	Dockerfile = "Dockerfile"
)

Variables

This section is empty.

Functions

func Factory

func Factory(task *hm.Task) (hm.Runner, error)

Factory is runner factory

Types

type ComposeConfig added in v1.3.0

type ComposeConfig struct {
	File          string   `map:"file"`
	ProjectName   string   `map:"project-name"`
	Services      []string `map:"services"`
	Deps          *bool    `map:"deps"`
	Recreate      *bool    `map:"recreate"`
	ForceRecreate string   `map:"recreate"`
	Build         *bool    `map:"build"`
	RemoveOrphans bool     `map:"remove-orphans"`
}

ComposeConfig defines docker-compose parameters

type Runner

type Runner struct {
	Task *hm.Task `map:"-"`

	Build             string         `map:"build"`
	BuildFrom         string         `map:"build-from"`
	BuildArgs         []string       `map:"build-args"`
	Commits           []string       `map:"commit"`
	Push              []string       `map:"push"`
	Tags              []string       `map:"tags"`
	Labels            []string       `map:"labels"`
	LabelFiles        []string       `map:"label-files"`
	ForceRm           bool           `map:"force-rm"`
	Pull              bool           `map:"pull"`
	Cache             *bool          `map:"cache"`
	ContentTrust      *bool          `map:"content-trust"`
	Image             string         `map:"image"`
	SrcVolume         string         `map:"src-volume"`
	ExposeDocker      bool           `map:"expose-docker"`
	Env               []string       `map:"env"`
	EnvFiles          []string       `map:"env-files"`
	CapAdd            []string       `map:"cap-add"`
	CapDrop           []string       `map:"cap-drop"`
	Devices           []string       `map:"devices"`
	Privileged        bool           `map:"privileged"`
	Network           string         `map:"net"`
	Ports             []string       `map:"ports"`
	Hosts             []string       `map:"hosts"`
	DNSServers        []string       `map:"dns"`
	DNSSearch         string         `map:"dns-search"`
	DNSOpts           []string       `map:"dns-opts"`
	Link              []string       `map:"link"`
	User              string         `map:"user"`
	Groups            []string       `map:"groups"`
	Volumes           []string       `map:"volumes"`
	BlkIoWeight       *int           `map:"blkio-weight"`
	BlkIoWeightDevs   []string       `map:"blkio-weight-devices"`
	DevReadBps        []string       `map:"device-read-bps"`
	DevWriteBps       []string       `map:"device-write-bps"`
	DevReadIops       []string       `map:"device-read-iops"`
	DevWriteIops      []string       `map:"device-write-iops"`
	CPUShares         *int           `map:"cpu-shares"`
	CPUPeriod         *int           `map:"cpu-period"`
	CPUQuota          *int           `map:"cpu-quota"`
	CPUSetCPUs        string         `map:"cpuset-cpus"`
	CPUSetMems        string         `map:"cpuset-mems"`
	KernelMemory      string         `map:"kernel-memory"`
	Memory            string         `map:"memory"`
	MemorySwap        string         `map:"memory-swap"`
	MemoryReservation string         `map:"memory-reservation"`
	MemorySwappiness  *int           `map:"memory-swappiness"`
	ShmSize           string         `map:"shm-size"`
	ULimit            []string       `map:"ulimit"`
	Compose           *ComposeConfig `map:"compose"`
	ComposeFile       string         `map:"compose"`

	// reserved properties
	NoPasswdPatch bool `map:"no-passwd-patch"`
	// contains filtered or unexported fields
}

Runner is a docker runner

func (*Runner) Run

func (r *Runner) Run(sigCh <-chan os.Signal) (result hm.TaskResult, err error)

Run implements Runner

func (*Runner) Signature added in v1.1.0

func (r *Runner) Signature() string

Signature implements Runner

func (*Runner) Stop added in v1.3.0

func (r *Runner) Stop() error

Stop implements BackgroundRunner

func (*Runner) ValidateArtifacts added in v1.1.0

func (r *Runner) ValidateArtifacts() bool

ValidateArtifacts implements Runner

Jump to

Keyboard shortcuts

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