Documentation
¶
Overview ¶
Package buildx drives `docker buildx build` for patchy build: it builds the argv for one image entry and runs it through the same tool-runner seam the scanners use, exporting an OCI layout directory instead of loading into a daemon or pushing — nothing reaches a registry until the scan has passed.
With SOURCE_DATE_EPOCH set the export rewrites layer timestamps, so a rebuild of the same commit yields the same digest and a re-run lands on skipped-current instead of a tag conflict.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// Runner executes docker (nil: the real PATH).
Runner scan.ToolRunner
}
Builder runs builds through a tool runner.
type Request ¶
type Request struct {
// Dockerfile and Context are paths (absolute, or relative to the
// process working directory).
Dockerfile string
Context string
// Platforms are os/arch[/variant] strings.
Platforms []string
// Target optionally names the build stage.
Target string
// Args are build args, emitted sorted by key.
Args map[string]string
// Secrets are BuildKit secret mounts, emitted sorted by ID. Each names
// where docker reads the value (an environment variable or a file);
// the value itself never enters the argv.
Secrets []Secret
// Output is the OCI layout directory the build exports to.
Output string
// SourceDateEpoch, when set, is passed to buildx and turns on
// rewrite-timestamp for a reproducible digest.
SourceDateEpoch string
}
Request is one image build.