typdocker

package
v0.8.37 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DockerComposeYml is yml file
	DockerComposeYml = "docker-compose.yml"
	// Version of docker compose
	Version = "3"
)

Functions

This section is empty.

Types

type ComposeFn added in v0.8.36

type ComposeFn func() (*Recipe, error)

ComposeFn function

type Composer added in v0.8.15

type Composer interface {
	ComposeV3() (*Recipe, error)
}

Composer responsible to compose docker

func NewCompose added in v0.8.36

func NewCompose(fn ComposeFn) Composer

NewCompose return new instance of composer

type DockerCmd added in v0.8.36

type DockerCmd struct {
	Composers []Composer
}

DockerCmd for docker

func (*DockerCmd) CmdCompose added in v0.8.36

func (m *DockerCmd) CmdCompose(c *typgo.BuildSys) *cli.Command

CmdCompose command compose

func (*DockerCmd) CmdDown added in v0.8.36

func (m *DockerCmd) CmdDown(c *typgo.BuildSys) *cli.Command

CmdDown command down

func (*DockerCmd) CmdUp added in v0.8.36

func (m *DockerCmd) CmdUp(c *typgo.BuildSys) *cli.Command

CmdUp command up

func (*DockerCmd) CmdWipe added in v0.8.36

func (m *DockerCmd) CmdWipe(c *typgo.BuildSys) *cli.Command

CmdWipe command wipe

func (*DockerCmd) Command added in v0.8.36

func (m *DockerCmd) Command(sys *typgo.BuildSys) *cli.Command

Command of docker

func (*DockerCmd) Execute added in v0.8.36

func (m *DockerCmd) Execute(c *typgo.Context) error

Execute docker command

type Network

type Network struct {
	Driver string `yaml:"driver,omitempty"`
}

Network in docker-compose.yaml

type Networks added in v0.8.15

type Networks map[string]interface{}

Networks descriptor in docker-compose.yml

type Recipe added in v0.8.36

type Recipe struct {
	Version  string
	Services Services
	Networks Networks
	Volumes  Volumes
}

Recipe represent docker-compose.yml

func (*Recipe) ComposeV3 added in v0.8.36

func (c *Recipe) ComposeV3() (*Recipe, error)

ComposeV3 the recipe

type Service

type Service struct {
	Image       string            `yaml:"image,omitempty"`
	Command     string            `yaml:"command,omitempty"`
	Environment map[string]string `yaml:"environment,omitempty"`
	Volumes     []string          `yaml:"volumes,omitempty"`
	Ports       []string          `yaml:"ports,omitempty"`
	Networks    []string          `yaml:"networks,omitempty"`
	Restart     string            `yaml:"restart,omitempty"`
}

Service in docker-compose.yaml

type Services added in v0.8.15

type Services map[string]interface{}

Services descriptor in docker-compose.yml

type Volumes added in v0.8.15

type Volumes map[string]interface{}

Volumes descriptor in docker-compose.yml

Jump to

Keyboard shortcuts

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