build

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 57 Imported by: 12

Documentation

Index

Constants

View Source
const DockerfileLabel = "com.docker.image.source.entrypoint"

Variables

This section is empty.

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 added in v0.9.0

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), allowNoOutput bool) (resp map[string]*client.SolveResponse, err error)

func Invoke added in v0.9.0

func Invoke(ctx context.Context, cfg ContainerConfig) error

Invoke invokes a build result as a container.

func LoadInputs

func LoadInputs(ctx context.Context, d driver.Driver, inp Inputs, pw progress.Writer, target *client.SolveOpt) (func(), error)

Types

type ContainerConfig added in v0.9.0

type ContainerConfig struct {
	ResultCtx *ResultContext

	Stdin  io.ReadCloser
	Stdout io.WriteCloser
	Stderr io.WriteCloser
	Tty    bool

	Entrypoint []string
	Cmd        []string
	Env        []string
	User       *string
	Cwd        *string
}

ContainerConfig is configuration for a container to run.

type Inputs

type Inputs struct {
	ContextPath      string
	DockerfilePath   string
	InStream         io.Reader
	ContextState     *llb.State
	DockerfileInline string
	NamedContexts    map[string]NamedContext
}

type NamedContext added in v0.8.0

type NamedContext struct {
	Path  string
	State *llb.State
}

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
	ImageIDFile   string
	Labels        map[string]string
	NetworkMode   string
	NoCache       bool
	NoCacheFilter []string
	Platforms     []specs.Platform
	Pull          bool
	Session       []session.Attachable
	ShmSize       opts.MemBytes
	Tags          []string
	Target        string
	Ulimits       *opts.UlimitOpt

	// Linked marks this target as exclusively linked (not requested by the user).
	Linked    bool
	PrintFunc *PrintFunc
}

type PrintFunc added in v0.9.0

type PrintFunc struct {
	Name   string
	Format string
}

type ResultContext added in v0.9.0

type ResultContext struct {
	Client *client.Client
	Res    *gateway.Result
}

ResultContext is a build result with the client that built it.

Jump to

Keyboard shortcuts

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