docker

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StandardLogOptions = &LoggingConfig{
	Driver: "json-file",
	Options: map[string]string{
		"max-size": "10m",
		"max-file": "1",
	},
}

Functions

func CopyFileToVolume added in v0.0.17

func CopyFileToVolume(volumeName string, sourcePath string, destPath string, verbose bool) error

func CreateVolume added in v0.0.17

func CreateVolume(volumeName string, verbose bool) error

func MkdirInVolume added in v0.0.17

func MkdirInVolume(volumeName string, directory string, verbose bool) error

func RemoveVolume added in v0.0.17

func RemoveVolume(volumeName string, verbose bool) error

func RunDockerCommand

func RunDockerCommand(workingDir string, showCommand bool, pipeStdout bool, command ...string) error

func RunDockerComposeCommand

func RunDockerComposeCommand(workingDir string, showCommand bool, pipeStdout bool, command ...string) error

Types

type DependsOn added in v0.0.29

type DependsOn map[string]map[string]string

type DockerComposeConfig added in v0.0.29

type DockerComposeConfig struct {
	Version  string              `yaml:"version,omitempty"`
	Services map[string]*Service `yaml:"services,omitempty"`
	Volumes  map[string]struct{} `yaml:"volumes,omitempty"`
}

func CreateDockerCompose added in v0.0.29

func CreateDockerCompose(stack *types.Stack) *DockerComposeConfig

type HealthCheck added in v0.0.29

type HealthCheck struct {
	Test     []string `yaml:"test,omitempty"`
	Interval string   `yaml:"interval,omitempty"`
	Timeout  string   `yaml:"timeout,omitempty"`
	Retries  int      `yaml:"retries,omitempty"`
}

type LoggingConfig added in v0.0.29

type LoggingConfig struct {
	Driver  string            `yaml:"driver,omitempty"`
	Options map[string]string `yaml:"options,omitempty"`
}

type Service added in v0.0.29

type Service struct {
	Image       string                       `yaml:"image,omitempty"`
	Build       string                       `yaml:"build,omitempty"`
	Command     string                       `yaml:"command,omitempty"`
	Environment map[string]string            `yaml:"environment,omitempty"`
	Volumes     []string                     `yaml:"volumes,omitempty"`
	Ports       []string                     `yaml:"ports,omitempty"`
	DependsOn   map[string]map[string]string `yaml:"depends_on,omitempty"`
	HealthCheck *HealthCheck                 `yaml:"healthcheck,omitempty"`
	Logging     *LoggingConfig               `yaml:"logging,omitempty"`
}

type ServiceDefinition added in v0.0.29

type ServiceDefinition struct {
	ServiceName string
	Service     *Service
	VolumeNames []string
}

Jump to

Keyboard shortcuts

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