docker

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

* Convey * Copyright 2016-2017 Gary Kramlich <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var (
	Tasks = map[string]tasks.Task{
		"build":  &Build{},
		"export": &Export{},
		"import": &Import{},
		"login":  &Login{},
		"logout": &Logout{},
		"pull":   &Pull{},
		"push":   &Push{},
		"remove": &Remove{},
		"run":    &Run{},
		"tag":    &Tag{},
	}
)

Functions

func Docker added in v0.8.0

func Docker(name, template string, params map[string]interface{}, st *state.State) error

func DockerOutput added in v0.8.0

func DockerOutput(name, template string, params map[string]interface{}, st *state.State) (string, string, error)

func ParseImage added in v0.8.0

func ParseImage(image string) (string, string, string)

ParseImage will convert an image like python:3 to it's registry, name, and tag

func StopContainer added in v0.9.0

func StopContainer(cid string, logger *gomol.LogAdapter, st *state.State) error

StopContainer will call 'docker stop' on the given container id

Types

type Build

type Build struct {
	Dockerfile string             `yaml:"dockerfile"`
	Files      yaml.StringOrSlice `yaml:"files"`
	Tag        string             `yaml:"tag"`
	Tags       yaml.StringOrSlice `yaml:"tags"`
	Labels     yaml.StringOrSlice `yaml:"labels"`
	Arguments  yaml.StringOrSlice `yaml:"arguments"`
}

func (*Build) Execute

func (b *Build) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Build) New

func (b *Build) New() tasks.Task

func (*Build) Valid

func (b *Build) Valid() error

type Export

type Export struct {
	Files yaml.StringOrSlice `yaml:"files"`
}

func (*Export) Execute

func (e *Export) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Export) New

func (e *Export) New() tasks.Task

func (*Export) Valid

func (e *Export) Valid() error

type HealthCheck added in v0.9.0

type HealthCheck struct {
	Command     string        `yaml:"command"`
	Interval    time.Duration `yaml:"interval"`
	Retries     int           `yaml:"retries"`
	StartPeriod time.Duration `yaml:"start-period"`
	Timeout     time.Duration `yaml:"timeout"`
}

type Import

type Import struct {
	Files yaml.StringOrSlice `yaml:"files"`
}

func (*Import) Execute

func (i *Import) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Import) New

func (i *Import) New() tasks.Task

func (*Import) Valid

func (i *Import) Valid() error

type Login

type Login struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Server   string `yaml:"server"`
}

func (*Login) Execute

func (l *Login) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Login) New

func (l *Login) New() tasks.Task

func (*Login) Valid

func (l *Login) Valid() error

type Logout

type Logout struct {
	Server string `yaml:"server"`
}

func (*Logout) Execute

func (l *Logout) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Logout) New

func (l *Logout) New() tasks.Task

func (*Logout) Valid

func (l *Logout) Valid() error

type Network added in v0.9.0

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

func NewNetwork added in v0.9.0

func NewNetwork(st *state.State) (*Network, error)

func (*Network) Destroy added in v0.9.0

func (network *Network) Destroy() error

func (*Network) Name added in v0.9.0

func (network *Network) Name() string

type Pull

type Pull struct {
	Image  string             `yaml:"image"`
	Images yaml.StringOrSlice `yaml:"images"`
}

func (*Pull) Execute

func (p *Pull) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Pull) New

func (p *Pull) New() tasks.Task

func (*Pull) Valid

func (p *Pull) Valid() error

type Push

type Push struct {
	Image  string             `yaml:"image"`
	Images yaml.StringOrSlice `yaml:"images"`
}

func (*Push) Execute

func (p *Push) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Push) New

func (p *Push) New() tasks.Task

func (*Push) Valid

func (p *Push) Valid() error

type Remove

type Remove struct {
	Image  string             `yaml:"image"`
	Images yaml.StringOrSlice `yaml:"images"`
}

func (*Remove) Execute

func (r *Remove) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Remove) New

func (r *Remove) New() tasks.Task

func (*Remove) Valid

func (r *Remove) Valid() error

type Run

type Run struct {
	Command     string             `yaml:"command"`
	Detach      bool               `yaml:"detach"`
	EntryPoint  string             `yaml:"entrypoint"`
	Environment yaml.StringOrSlice `yaml:"environment"`
	Image       string             `yaml:"image"`
	WorkDir     string             `yaml:"workdir"`
	WorkSpace   string             `yaml:"workspace"`
	Script      yaml.StringOrSlice `yaml:"script"`
	Shell       string             `yaml:"shell"`
	Labels      yaml.StringOrSlice `yaml:"labels"`
	HealthCheck HealthCheck        `yaml:"healthcheck"`
}

func (*Run) Execute

func (r *Run) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Run) New

func (r *Run) New() tasks.Task

func (*Run) UnmarshalYAML added in v0.5.0

func (r *Run) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Run) Valid

func (r *Run) Valid() error

type Tag

type Tag struct {
	Source       string             `yaml:"source"`
	Destination  string             `yaml:"destination"`
	Destinations yaml.StringOrSlice `yaml:"destinations"`
}

func (*Tag) Execute

func (t *Tag) Execute(name string, logger *gomol.LogAdapter, env []string, st *state.State) error

func (*Tag) New

func (t *Tag) New() tasks.Task

func (*Tag) Valid

func (t *Tag) Valid() error

type Workspace added in v0.9.0

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

func NewWorkspace added in v0.9.0

func NewWorkspace(st *state.State) (*Workspace, error)

func (*Workspace) Destroy added in v0.9.0

func (ws *Workspace) Destroy() error

func (*Workspace) Name added in v0.9.0

func (ws *Workspace) Name() string

Jump to

Keyboard shortcuts

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