Help us shape the future of Go! Take the 2026 Go Developer Survey

defaultdockerbuilder

package
v1.118.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
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

func UsesDockerContainerDriver() (bool, error)

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 WithBuildArgs(buildArgs []string) Option

func WithBuildArgsScript added in v1.50.0

func WithBuildArgsScript(buildArgsScript string) Option

func WithBuildxDriverOptions added in v1.50.0

func WithBuildxDriverOptions(buildxDriverOptions []string) Option

func WithBuildxOutput added in v1.50.0

func WithBuildxOutput(output OutputType) Option

func WithBuildxPlatforms added in v1.50.0

func WithBuildxPlatforms(buildxPlatforms []string) Option

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL