Documentation
¶
Index ¶
- Constants
- Variables
- func Build(ctx context.Context, nodes []builder.Node, opts map[string]Options, ...) (resp map[string]*client.SolveResponse, err error)
- func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opts map[string]Options, ...) (resp map[string]*client.SolveResponse, err error)
- func CreateCaches(entries []*buildflags.CacheOptionsEntry) []client.CacheOptionsEntry
- func CreateExports(entries []*buildflags.ExportEntry) ([]client.ExportEntry, []string, error)
- func CreateSSH(ssh []*buildflags.SSH) (session.Attachable, error)
- func CreateSecrets(secrets []*buildflags.Secret) (session.Attachable, error)
- func Dial(ctx context.Context, nodes []builder.Node, pw progress.Writer, ...) (net.Conn, error)
- func IsRemoteURL(c string) bool
- func ReadSourcePolicy() (*spb.Policy, error)
- type CallFunc
- type Container
- type Handler
- type Inputs
- type InvokeConfig
- type NamedContext
- type Options
- type ResultHandle
- type SuspendOn
- type SyncMultiReader
Constants ¶
View Source
const DockerfileLabel = "com.docker.image.source.entrypoint"
Variables ¶
View Source
var ErrRestart = errors.New("build: restart")
Functions ¶
func BuildWithResultHandler ¶ added in v0.9.0
func CreateCaches ¶ added in v0.25.0
func CreateCaches(entries []*buildflags.CacheOptionsEntry) []client.CacheOptionsEntry
func CreateExports ¶ added in v0.25.0
func CreateExports(entries []*buildflags.ExportEntry) ([]client.ExportEntry, []string, error)
func CreateSSH ¶ added in v0.25.0
func CreateSSH(ssh []*buildflags.SSH) (session.Attachable, error)
func CreateSecrets ¶ added in v0.25.0
func CreateSecrets(secrets []*buildflags.Secret) (session.Attachable, error)
func IsRemoteURL ¶ added in v0.11.0
func ReadSourcePolicy ¶ added in v0.11.0
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 ¶ added in v0.11.0
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶ added in v0.11.0
func NewContainer(ctx context.Context, resultCtx *ResultHandle, cfg *InvokeConfig) (*Container, error)
func (*Container) Exec ¶ added in v0.11.0
func (c *Container) Exec(ctx context.Context, cfg *InvokeConfig, stdin io.ReadCloser, stdout io.WriteCloser, stderr io.WriteCloser) error
func (*Container) IsUnavailable ¶ added in v0.11.0
type Inputs ¶
type Inputs struct {
ContextPath string
DockerfilePath string
InStream *SyncMultiReader
ContextState *llb.State
DockerfileInline string
NamedContexts map[string]NamedContext
// DockerfileMappingSrc and DockerfileMappingDst are filled in by the builder.
DockerfileMappingSrc string
DockerfileMappingDst string
}
type InvokeConfig ¶ added in v0.25.0
type InvokeConfig struct {
Entrypoint []string
Cmd []string
NoCmd bool
Env []string
User string
NoUser bool
Cwd string
NoCwd bool
Tty bool
Rollback bool
Initial bool
SuspendOn SuspendOn
}
func (*InvokeConfig) NeedsDebug ¶ added in v0.25.0
func (cfg *InvokeConfig) NeedsDebug(err error) bool
type NamedContext ¶ added in v0.8.0
type Options ¶
type Options struct {
Inputs Inputs
Ref string
Allow []string
Attests map[string]*string
BuildArgs map[string]string
CacheFrom []client.CacheOptionsEntry
CacheTo []client.CacheOptionsEntry
CgroupParent string
Exports []client.ExportEntry
ExportsLocalPathsTemporary []string // should be removed after client.ExportEntry update in buildkit v0.19.0
ExtraHosts []string
Labels map[string]string
NetworkMode string
NoCache bool
NoCacheFilter []string
Platforms []ocispecs.Platform
Pull bool
SecretSpecs buildflags.Secrets
SSHSpecs []*buildflags.SSH
ShmSize opts.MemBytes
Tags []string
Target string
Ulimits *opts.UlimitOpt
Session []session.Attachable
Linked bool // Linked marks this target as exclusively linked (not requested by the user).
CallFunc *CallFunc
ProvenanceResponseMode confutil.MetadataProvenanceMode
SourcePolicy *spb.Policy
GroupRef string
}
type ResultHandle ¶ added in v0.11.0
type ResultHandle struct {
// contains filtered or unexported fields
}
ResultHandle is a build result with the client that built it.
func NewResultHandle ¶ added in v0.11.0
func NewResultHandle(ctx context.Context, c gateway.Client, res *gateway.Result, err error) *ResultHandle
NewResultHandle stores a gateway client, gateway result, and the error from an evaluate call if it is present.
This ResultHandle can be used to execute additional build steps in the same context as the build occurred, which can allow easy debugging of build failures and successes.
If the returned ResultHandle is not nil, the caller must call Done() on it.
func (*ResultHandle) Done ¶ added in v0.11.0
func (r *ResultHandle) Done()
func (*ResultHandle) NewContainer ¶ added in v0.25.0
func (r *ResultHandle) NewContainer(ctx context.Context, cfg *InvokeConfig) (gateway.Container, error)
type SuspendOn ¶ added in v0.25.0
type SuspendOn int
func (SuspendOn) DebugEnabled ¶ added in v0.25.0
type SyncMultiReader ¶ added in v0.17.0
type SyncMultiReader struct {
// contains filtered or unexported fields
}
func NewSyncMultiReader ¶ added in v0.17.0
func NewSyncMultiReader(source io.Reader) *SyncMultiReader
func (*SyncMultiReader) NewReadCloser ¶ added in v0.17.0
func (mr *SyncMultiReader) NewReadCloser() io.ReadCloser
func (*SyncMultiReader) Peek ¶ added in v0.17.0
func (mr *SyncMultiReader) Peek(n int) ([]byte, error)
func (*SyncMultiReader) Reset ¶ added in v0.17.0
func (mr *SyncMultiReader) Reset(dt []byte)
Click to show internal directories.
Click to hide internal directories.