package build
import "github.com/docker/buildx/build"
Index ¶
- Constants
- func Build(ctx context.Context, nodes []builder.Node, opt map[string]Options, docker *dockerutil.Client, configDir string, w progress.Writer) (resp map[string]*client.SolveResponse, err error)
- func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[string]Options, docker *dockerutil.Client, configDir string, w progress.Writer, resultHandleFunc func(driverIndex int, rCtx *ResultContext)) (resp map[string]*client.SolveResponse, err error)
- func IsRemoteURL(c string) bool
- func LoadInputs(ctx context.Context, d driver.Driver, inp Inputs, pw progress.Writer, target *client.SolveOpt) (func(), error)
- func ReadSourcePolicy() (*spb.Policy, error)
- type Container
- func NewContainer(ctx context.Context, resultCtx *ResultContext, cfg *controllerapi.InvokeConfig) (*Container, error)
- func (c *Container) Cancel()
- func (c *Container) Exec(ctx context.Context, cfg *controllerapi.InvokeConfig, stdin io.ReadCloser, stdout io.WriteCloser, stderr io.WriteCloser) error
- func (c *Container) IsUnavailable() bool
- type Inputs
- type NamedContext
- type Options
- type PrintFunc
- type ResultContext
Constants ¶
const DockerfileLabel = "com.docker.image.source.entrypoint"
Functions ¶
func Build ¶
func Build(ctx context.Context, nodes []builder.Node, opt map[string]Options, docker *dockerutil.Client, configDir string, w progress.Writer) (resp map[string]*client.SolveResponse, err error)
func BuildWithResultHandler ¶
func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[string]Options, docker *dockerutil.Client, configDir string, w progress.Writer, resultHandleFunc func(driverIndex int, rCtx *ResultContext)) (resp map[string]*client.SolveResponse, err error)
func IsRemoteURL ¶
func LoadInputs ¶
func LoadInputs(ctx context.Context, d driver.Driver, inp Inputs, pw progress.Writer, target *client.SolveOpt) (func(), error)
func ReadSourcePolicy ¶
ReadSourcePolicy reads a source policy from a file. The file path is taken from EXPERIMENTAL_BUILDKIT_SOURCE_POLICY env var. if the env var is not set, this `returns nil, nil`
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶
func NewContainer(ctx context.Context, resultCtx *ResultContext, cfg *controllerapi.InvokeConfig) (*Container, error)
func (*Container) Cancel ¶
func (c *Container) Cancel()
func (*Container) Exec ¶
func (c *Container) Exec(ctx context.Context, cfg *controllerapi.InvokeConfig, stdin io.ReadCloser, stdout io.WriteCloser, stderr io.WriteCloser) error
func (*Container) IsUnavailable ¶
type Inputs ¶
type Inputs struct { ContextPath string DockerfilePath string InStream io.Reader ContextState *llb.State DockerfileInline string NamedContexts map[string]NamedContext }
type NamedContext ¶
type Options ¶
type Options struct { Inputs Inputs Allow []entitlements.Entitlement Attests map[string]*string BuildArgs map[string]string CacheFrom []client.CacheOptionsEntry CacheTo []client.CacheOptionsEntry CgroupParent string Exports []client.ExportEntry ExtraHosts []string Labels map[string]string NetworkMode string NoCache bool NoCacheFilter []string Platforms []specs.Platform Pull bool ShmSize opts.MemBytes Tags []string Target string Ulimits *opts.UlimitOpt Session []session.Attachable // Linked marks this target as exclusively linked (not requested by the user). Linked bool PrintFunc *PrintFunc SourcePolicy *spb.Policy }
type PrintFunc ¶
type ResultContext ¶
type ResultContext struct {
// contains filtered or unexported fields
}
ResultContext is a build result with the client that built it.
func NewResultContext ¶
func NewResultContext(ctx context.Context, c *client.Client, solveOpt client.SolveOpt, res *gateway.Result) (*ResultContext, error)
func (*ResultContext) Done ¶
func (r *ResultContext) Done()
Source Files ¶
build.go git.go invoke.go result.go url.go utils.go
- Version
- v0.11.0-rc1
- Published
- May 12, 2023
- Platform
- js/wasm
- Imports
- 63 packages
- Last checked
- 6 hours ago –
Tools for package owners.