docker_compose

package
v1.3.1-0...-3e602c1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVolumeSrcKey

func GetVolumeSrcKey(projectName string, serviceName string, volume project.ContainerServiceVolume) string

func SanitizeVolume

func SanitizeVolume(s string) string

Types

type DockerAuth

type DockerAuth struct {
	Auth string
}

type DockerCompose

type DockerCompose struct {
	Version  string              `yaml:"version"`
	Services map[string]Services `yaml:"services"`
	Networks map[string]Network  `yaml:"networks"`
	Volumes  map[string]Volume   `yaml:"volumes,omitempty"`
}

func BuildDockerCompose

func BuildDockerCompose(project *project.Project) (DockerCompose, error)

func (DockerCompose) Map

func (d DockerCompose) Map() (map[string]interface{}, error)

func (DockerCompose) String

func (d DockerCompose) String() (string, error)

type DriverOpts

type DriverOpts struct {
	Type   string
	O      string
	Device string
}

type LocalDockerConfig

type LocalDockerConfig struct {
	Auths map[string]DockerAuth
}

type Network

type Network struct {
}

type ServiceNetwork

type ServiceNetwork struct {
	Aliases []string
}

type ServiceVolume

type ServiceVolume struct {
	Type     string
	Source   string
	Target   string
	ReadOnly bool `yaml:"read_only"`
}

type Services

type Services struct {
	ContainerName string `yaml:"container_name"`
	Image         string
	Restart       string
	Labels        map[string]string
	User          string                    `yaml:"user,omitempty"`
	Networks      map[string]ServiceNetwork `yaml:"networks,flow"`
	Volumes       []ServiceVolume           `yaml:"volumes,omitempty"`
	Ports         []string                  `yaml:"ports,omitempty"`
	Environment   map[string]string         `yaml:"environment,omitempty"`
	DependsOn     []string                  `yaml:"depends_on,omitempty"`
	VolumesFrom   []string                  `yaml:"volumes_from,omitempty"`
}

type Volume

type Volume struct {
	DriverOpts DriverOpts `yaml:"driver_opts,omitempty"`
}

Jump to

Keyboard shortcuts

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