docker_compose

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

README

docker-compose

go library for controlling docker compose

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Version  string             `yaml:"version"`
	Services map[string]Service `yaml:"services"`
	Networks map[string]Network `yaml:"networks,omitempty"`
}

func LoadBytes

func LoadBytes(data []byte) (File, error)

func LoadFile

func LoadFile(path string) (File, error)

func (File) SaveBytes

func (f File) SaveBytes() ([]byte, error)

func (File) SaveFile

func (f File) SaveFile(path string) error

type IContainers

type IContainers interface {
	Down() error
	Log() error
	Up() error
	Build() error
	Stop() error
	LogService(service string) error
	LogServiceWithHandler(service string, output io.Writer) error
}

func Create

func Create() IContainers

func CreateFile

func CreateFile(path string) IContainers

type Network

type Network struct {
	External bool `yaml:"external,omitempty"`
}

type Service

type Service struct {
	Image       string   `yaml:"image,omitempty"`
	Build       string   `yaml:"build,omitempty"`
	Command     string   `yaml:"command,omitempty"`
	Environment []string `yaml:"environment,omitempty"`
	Volumes     []string `yaml:"volumes,omitempty"`
	DependsOn   []string `yaml:"depends_on,omitempty"`
	Ports       []string `yaml:"ports,omitempty"`
	NetworkMode string   `yaml:"network_mode,omitempty"`
	Networks    []string `yaml:"networks,omitempty"`
	Links       []string `yaml:"links,omitempty"`
	Expose      []string `yaml:"expose,omitempty"`
	Scale       int      `yaml:"scale,omitempty"`
}

Jump to

Keyboard shortcuts

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