Documentation ¶
Index ¶
- func DownWithDockerComposeFileCommand(filePath string) []string
- func UpWithDockerComposeFileCommand(filePath string) []string
- type DockerYAML
- type Network
- type Service
- func (that *Service) AddEnvironment(env string) *Service
- func (that *Service) AddEnvironments(envs []string) *Service
- func (that *Service) AddNetwork(from string, to string) *Service
- func (that *Service) AddNetworks(from []string, to []string) *Service
- func (that *Service) AddPort(from uint, to uint) *Service
- func (that *Service) AddPorts(from []uint, to []uint) *Service
- func (that *Service) AddVolume(from string, to string) *Service
- func (that *Service) AddVolumes(from []string, to []string) *Service
- func (that *Service) SetCommand(command string) *Service
- func (that *Service) SetContainerName(name string) *Service
- func (that *Service) SetImage(image string) *Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DockerYAML ¶
type DockerYAML struct { Version string `yaml:"version"` Networks map[string]*Network `yaml:"networks"` Services map[string]*Service `yaml:"services"` }
func GenerateDockerYAML ¶
func GenerateDockerYAML(version string) *DockerYAML
func (*DockerYAML) AddNetwork ¶
func (that *DockerYAML) AddNetwork(network *Network) error
func (*DockerYAML) AddService ¶
func (that *DockerYAML) AddService(service *Service) error
func (*DockerYAML) ExportToByteArray ¶
func (that *DockerYAML) ExportToByteArray() ([]byte, error)
func (*DockerYAML) ExportToFile ¶
func (that *DockerYAML) ExportToFile(path string, fileName string) error
type Service ¶
type Service struct { Image string `yaml:"image"` Environment []string `yaml:"environment"` Ports []string `yaml:"ports"` Command string `yaml:"command"` Volumes []string `yaml:"volumes"` ContainerName string `yaml:"container_name"` Networks []string `yaml:"networks"` WorkingDir string `yaml:"working_dir"` DependsOn []string `yaml:"depends_on"` Tty bool `yaml:"tty"` StdinOpen bool `yaml:"stdin_open"` }
func GenerateService ¶
func GenerateService() *Service
func (*Service) AddEnvironment ¶
func (*Service) AddEnvironments ¶
func (*Service) SetCommand ¶
func (*Service) SetContainerName ¶
Click to show internal directories.
Click to hide internal directories.