typdocker

package
v0.8.17 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposeObject added in v0.8.15

type ComposeObject struct {
	Version  Version
	Services Services
	Networks Networks
	Volumes  Volumes
}

ComposeObject represent docker-compose.yml

func (*ComposeObject) Append added in v0.8.15

func (c *ComposeObject) Append(comp *ComposeObject)

Append another compose object

type Composer added in v0.8.15

type Composer interface {
	DockerCompose(version Version) *ComposeObject
}

Composer responsible to compose docker

type Module

type Module struct {
	Version   Version
	Composers []Composer
}

Module of docker

func New added in v0.8.15

func New() *Module

New docker module

func (*Module) BuildCommands added in v0.8.9

func (m *Module) BuildCommands(ctx *typcore.BuildContext) []*cli.Command

BuildCommands is command collection to called from

func (*Module) WithComposers added in v0.8.16

func (m *Module) WithComposers(composers ...Composer) *Module

WithComposers to set the composers

func (*Module) WithVersion added in v0.8.15

func (m *Module) WithVersion(version Version) *Module

WithVersion to set the version

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 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 Version added in v0.8.15

type Version string

Version of docker compose

func (*Version) IsV3 added in v0.8.15

func (v *Version) IsV3() bool

IsV3 return true if the version belong to docker-compose v3

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