build

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBuild

func RunBuild(ctx context.Context, dockerCli command.Cli, in *Options, inStream io.Reader, progress progress.Writer, generateResult bool) (*client.SolveResponse, *build.ResultHandle, *build.Inputs, error)

RunBuild runs the specified build and returns the result.

NOTE: When an error happens during the build and this function acquires the debuggable *build.ResultHandle, this function returns it in addition to the error (i.e. it does "return nil, res, err"). The caller can inspect the result and debug the cause of that error.

Types

type Options added in v0.24.0

type Options struct {
	ContextPath            string
	DockerfileName         string
	CallFunc               *pb.CallFunc
	NamedContexts          map[string]string
	Allow                  []string
	Attests                []*pb.Attest
	BuildArgs              map[string]string
	CacheFrom              []*pb.CacheOptionsEntry
	CacheTo                []*pb.CacheOptionsEntry
	CgroupParent           string
	Exports                []*pb.ExportEntry
	ExtraHosts             []string
	Labels                 map[string]string
	NetworkMode            string
	NoCacheFilter          []string
	Platforms              []string
	Secrets                []*pb.Secret
	ShmSize                int64
	SSH                    []*pb.SSH
	Tags                   []string
	Target                 string
	Ulimits                *pb.UlimitOpt
	Builder                string
	NoCache                bool
	Pull                   bool
	ExportPush             bool
	ExportLoad             bool
	SourcePolicy           *sourcepolicy.Policy
	Ref                    string
	GroupRef               string
	Annotations            []string
	ProvenanceResponseMode string
}

func ResolveOptionPaths added in v0.24.0

func ResolveOptionPaths(options *Options) (_ *Options, err error)

ResolveOptionPaths resolves all paths contained in BuildOptions and replaces them to absolute paths.

Jump to

Keyboard shortcuts

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