Documentation ¶
Index ¶
- Variables
- func CheckDockerConfig() error
- func CopyFileToVolume(volumeName string, sourcePath string, destPath string, verbose bool) error
- func CopyFromContainer(containerName string, sourcePath string, destPath string, verbose bool) error
- func CreateVolume(volumeName string, verbose bool) error
- func MkdirInVolume(volumeName string, directory string, verbose bool) error
- func RemoveVolume(volumeName string, verbose bool) error
- func RunDockerCommand(workingDir string, showCommand bool, pipeStdout bool, command ...string) error
- func RunDockerCommandBuffered(workingDir string, showCommand bool, command ...string) (string, error)
- func RunDockerCommandRetry(workingDir string, showCommand bool, pipeStdout bool, retries int, ...) error
- func RunDockerComposeCommand(workingDir string, showCommand bool, pipeStdout bool, command ...string) error
- type DependsOn
- type DockerComposeConfig
- type HealthCheck
- type LoggingConfig
- type Service
- type ServiceDefinition
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 CheckDockerConfig ¶ added in v0.0.36
func CheckDockerConfig() error
CheckDockerConfig is a function to check docker and docker-compose configuration on the host
func CopyFileToVolume ¶
func CopyFromContainer ¶ added in v0.0.36
func CreateVolume ¶
func RemoveVolume ¶
func RunDockerCommand ¶
func RunDockerCommandBuffered ¶ added in v0.0.36
func RunDockerCommandRetry ¶ added in v0.0.35
Types ¶
type DockerComposeConfig ¶
type DockerComposeConfig struct { Version string `yaml:"version,omitempty"` Services map[string]*Service `yaml:"services,omitempty"` Volumes map[string]struct{} `yaml:"volumes,omitempty"` }
func CreateDockerCompose ¶
func CreateDockerCompose(s *types.Stack) *DockerComposeConfig
type HealthCheck ¶
type LoggingConfig ¶
type Service ¶
type Service struct { ContainerName string `yaml:"container_name,omitempty"` 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"` WorkingDir string `yaml:"working_dir,omitempty"` EntryPoint []string `yaml:"entrypoint,omitempty"` EnvFile string `yaml:"env_file,omitempty"` Expose []int `yaml:"expose,omitempty"` }
type ServiceDefinition ¶
Click to show internal directories.
Click to hide internal directories.