builder

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageConfigStr

func ImageConfigStr(labels map[string]string, ports map[string]struct{},
	entrypoint []string, env []string, user, workingDir string, platform *ocispecs.Platform) (string, error)

func ParseExportCache added in v0.2.0

func ParseExportCache(exportCaches, legacyExportCacheOpts []string) ([]client.CacheOptionsEntry, error)

ParseExportCache parses --export-cache (and legacy --export-cache-opt) Refer to github.com/moby/buildkit/cmd/buildctl/build/exportcache.go

func ParseFromStr added in v0.2.0

func ParseFromStr(fromStr string) (string, string, error)

func ParseImportCache added in v0.2.0

func ParseImportCache(importCaches []string) ([]gatewayclient.CacheOptionsEntry, error)

ParseImportCache parses --import-cache

Types

type Builder

type Builder interface {
	Build(ctx context.Context, force bool) error
	Interpret() error
	// Compile compiles envd IR to LLB.
	Compile(ctx context.Context) (*llb.Definition, error)
	GPUEnabled() bool
	NumGPUs() int
	ShmSize() int
	GetGraph() ir.Graph
}

func New

func New(ctx context.Context, opt Options) (Builder, error)

type BuildkitdErr added in v0.2.4

type BuildkitdErr struct {
	// contains filtered or unexported fields
}

func (*BuildkitdErr) Error added in v0.2.4

func (e *BuildkitdErr) Error() string

func (*BuildkitdErr) Format added in v0.2.4

func (e *BuildkitdErr) Format(s fmt.State, verb rune)

type Options added in v0.2.0

type Options struct {
	// ManifestFilePath is the path to the manifest file `build.envd`.
	ManifestFilePath string
	// ConfigFilePath is the path to the config file `config.envd`.
	ConfigFilePath string
	// ProgressMode is the output mode (auto, plain).
	ProgressMode string
	// Tag is the name of the image.
	Tag string
	// BuildContextDir is the directory of the build context.
	BuildContextDir string
	// BuildFuncName is the name of the build func.
	BuildFuncName string
	// PubKeyPath is the path to the ssh public key.
	PubKeyPath string
	// OutputOpts is the output options.
	OutputOpts string
	// ExportCache is the option to export cache.
	// e.g. type=registry,ref=docker.io/username/image
	ExportCache string
	// ImportCache is the option to import cache.
	// e.g. type=registry,ref=docker.io/username/image
	ImportCache string
	// UseHTTPProxy uses HTTPS_PROXY/HTTP_PROXY/NO_PROXY in the build process.
	UseHTTPProxy bool
	// Specify the target platform for the build output.
	// e.g. platform=linux/arm64,linux/amd64
	Platform string
}

Jump to

Keyboard shortcuts

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