Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComposeFile ¶
type ComposeFile struct { File string Data DockerCompose }
ComposeFile represents a docker-compose.yml file that can be manipulated
func New ¶ added in v0.7.0
func New(file string) ComposeFile
New returns an initialized compose file
func Read ¶ added in v0.7.0
func Read(file string) (ComposeFile, error)
Read loads a docker-compose.yml file
func (*ComposeFile) AddService ¶ added in v0.7.0
func (composeFile *ComposeFile) AddService(name string) *Service
AddService adds a service to a compose file
func (*ComposeFile) Read ¶ added in v0.7.0
func (composeFile *ComposeFile) Read() error
Read reads the data structure from the file note that all variable interpolations are fully rendered
func (*ComposeFile) Write ¶ added in v0.7.0
func (composeFile *ComposeFile) Write() error
Write writes the data to a file
func (*ComposeFile) Yaml ¶ added in v0.7.0
func (composeFile *ComposeFile) Yaml() ([]byte, error)
Yaml returns the yaml for this compose file
type DockerCompose ¶
type DockerCompose struct { Version string `yaml:"version"` Services map[string]*Service `yaml:"services"` }
DockerCompose represents a docker-compose.yml file
func UnmarshalComposeYAML ¶ added in v0.9.0
func UnmarshalComposeYAML(yamlBytes []byte) (DockerCompose, error)
UnmarshalComposeYAML unmarshals yaml into a DockerCompose struct handles versioning and schema issues
type Service ¶
type Service struct { Image string `yaml:"image,omitempty"` Ports []Port `yaml:"ports,omitempty"` Environment map[string]string `yaml:"environment,omitempty"` Secrets map[string]string `yaml:"x-fargate-secrets,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` }
Service represents a docker container
Click to show internal directories.
Click to hide internal directories.