Documentation
¶
Overview ¶
Package composeimage rewrites a Compose file for artifacts deploy (build → image).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateForArtifacts ¶
GenerateForArtifacts reads a Compose YAML document and produces a variant where built services use image: instead of build:.
func ServiceBuildDirs ¶ added in v1.1.0
ServiceBuildDirs returns services that declare build: and the host directory to pass as docker build context (absolute path). projectRoot is the compose project directory.
Types ¶
type Options ¶
type Options struct {
// TargetService is the app service whose build: block is replaced when AllBuilt is false (required then).
TargetService string
// ImageExpr is the YAML value for image: when ServiceImages is nil (default ${DEPLOY_IMAGE}).
ImageExpr string
// ServiceImages maps service name → full image reference for AllBuilt mode. When non-nil,
// every service with build: must appear in the map; each gets that literal image: value.
// When nil and AllBuilt, ImageExpr is used for all built services (same tag).
ServiceImages map[string]string
// AllBuilt if true, every service with build: is converted to image: (same ImageExpr).
// If false, only TargetService is converted and any other service with build: is an error.
AllBuilt bool
}
Options controls GenerateForArtifacts.
Click to show internal directories.
Click to hide internal directories.