Documentation
¶
Index ¶
- Constants
- func NewDefaultDockerBuilder(buildArgs []string, buildArgsScript string) distgo.DockerBuilder
- func NewDefaultDockerBuilderWithOptions(options ...Option) distgo.DockerBuilder
- func UsesDockerContainerDriver() (bool, error)
- type DefaultDockerBuilder
- type Option
- func WithBuildArgs(buildArgs []string) Option
- func WithBuildArgsScript(buildArgsScript string) Option
- func WithBuildxDriverOptions(buildxDriverOptions []string) Option
- func WithBuildxOutput(output OutputType) Option
- func WithBuildxPlatforms(buildxPlatforms []string) Option
- func WithOCIImageMetadata() Option
- type OutputType
Constants ¶
const TypeName = "default"
Variables ¶
This section is empty.
Functions ¶
func NewDefaultDockerBuilder ¶
func NewDefaultDockerBuilder(buildArgs []string, buildArgsScript string) distgo.DockerBuilder
func NewDefaultDockerBuilderWithOptions ¶ added in v1.50.0
func NewDefaultDockerBuilderWithOptions(options ...Option) distgo.DockerBuilder
func UsesDockerContainerDriver ¶ added in v1.80.0
Types ¶
type DefaultDockerBuilder ¶
type DefaultDockerBuilder struct {
BuildArgs []string
BuildArgsScript string
BuildxDriverOpts []string
BuildxPlatforms []string
OutputType OutputType
OCIImageMetadata bool
}
func (*DefaultDockerBuilder) RunDockerBuild ¶
func (d *DefaultDockerBuilder) RunDockerBuild(dockerID distgo.DockerID, productTaskOutputInfo distgo.ProductTaskOutputInfo, verbose, dryRun bool, stdout io.Writer) error
func (*DefaultDockerBuilder) TypeName ¶
func (d *DefaultDockerBuilder) TypeName() (string, error)
type Option ¶ added in v1.50.0
type Option func(*DefaultDockerBuilder)
func WithBuildArgs ¶ added in v1.50.0
func WithBuildArgsScript ¶ added in v1.50.0
func WithBuildxDriverOptions ¶ added in v1.50.0
func WithBuildxOutput ¶ added in v1.50.0
func WithBuildxOutput(output OutputType) Option
func WithBuildxPlatforms ¶ added in v1.50.0
WithBuildxPlatforms allows buildx builds to produce multi-platform images. The formatting for the platform specifier is defined in the containerd source code. https://github.com/containerd/containerd/blob/v1.4.3/platforms/platforms.go#L63
func WithOCIImageMetadata ¶ added in v1.118.0
func WithOCIImageMetadata() Option
WithOCIImageMetadata adds OCI source and version labels to all build outputs and annotations to OCI layouts. The source is the project's Git origin converted to an HTTPS URL, or empty if unavailable; the version is the project version. An empty source still overrides inherited labels, but is omitted from annotations. Multi-platform layouts annotate the index, manifests and manifest descriptors; other layouts annotate manifests. User build arguments and build-args-script output can override the generated metadata.
type OutputType ¶ added in v1.50.0
type OutputType uint
OutputType is a bitmask which specifies which artifacts to produce as part of the docker build. At least one build type must be specified, but multiple build types can be combined
const ( // OCILayout output type indicates that the build should produce an OCI-compliant filesystem layout as an output OCILayout OutputType = 1 << iota // DockerDaemon output type indicates that the build should produce an image in the local docker daemon DockerDaemon )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package integration contains the integration tests for distgo.
|
Package integration contains the integration tests for distgo. |