Documentation
¶
Index ¶
- func Boot(ctx, clientContext context.Context, d *DriverHandle, pw progress.Writer) (*client.Client, error)
- func BuilderName(name string) string
- func ParseBuilderName(name string) (string, error)
- func Register(f Factory)
- func VerifyImageRef(ctx context.Context, l progress.SubLogger, ref string, ...) (string, bool, error)
- type BuildkitConfig
- type Driver
- type DriverHandle
- func (d *DriverHandle) Client(ctx context.Context, opt ...client.ClientOpt) (*client.Client, error)
- func (d *DriverHandle) HistoryAPISupported(ctx context.Context) bool
- func (d *DriverHandle) RequiresUncachedClient() bool
- func (d *DriverHandle) UncachedClient(ctx context.Context) (*client.Client, error)
- type ErrNotConnecting
- type ErrNotRunning
- type Factory
- type Feature
- type ImageVerifier
- type Info
- type InitConfig
- type Status
- type UncachedClientDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuilderName ¶ added in v0.13.1
func ParseBuilderName ¶ added in v0.13.1
func VerifyImageRef ¶
func VerifyImageRef(ctx context.Context, l progress.SubLogger, ref string, platform *ocispecs.Platform, resolver policy.SourceMetadataResolver, verify ImageVerifier) (string, bool, error)
VerifyImageRef evaluates ref against the builtin default policy through verify and returns the reference pinned to the digest that verification resolved. The boolean result reports whether the policy applied: it is false, with ref returned unchanged, when there is no verifier, when ref is pinned by digest without a tag, or when ref is outside the managed moby/buildkit repository (unmanaged images pass through the default policy unchanged). A tagged canonical reference is still verified because its tag carries the release identity checked by the policy.
Types ¶
type BuildkitConfig ¶
type BuildkitConfig struct {
}
type Driver ¶
type Driver interface {
Factory() Factory
Bootstrap(context.Context, progress.Logger) error
Info(context.Context) (*Info, error)
Version(context.Context) (string, error)
Stop(ctx context.Context, force bool) error
Rm(ctx context.Context, force, rmVolume, rmDaemon bool) error
Dial(ctx context.Context) (net.Conn, error)
Client(ctx context.Context, opts ...client.ClientOpt) (*client.Client, error)
Features(ctx context.Context) map[Feature]bool
HostGatewayIP(ctx context.Context) (net.IP, error)
IsMobyDriver() bool
Config() InitConfig
}
type DriverHandle ¶ added in v0.11.0
type DriverHandle struct {
Driver
// contains filtered or unexported fields
}
func GetDriver ¶
func GetDriver(ctx context.Context, f Factory, cfg InitConfig) (*DriverHandle, error)
func (*DriverHandle) HistoryAPISupported ¶ added in v0.11.0
func (d *DriverHandle) HistoryAPISupported(ctx context.Context) bool
func (*DriverHandle) RequiresUncachedClient ¶
func (d *DriverHandle) RequiresUncachedClient() bool
func (*DriverHandle) UncachedClient ¶
type ErrNotConnecting ¶
type ErrNotConnecting struct{}
func (ErrNotConnecting) Error ¶ added in v0.17.0
func (ErrNotConnecting) Error() string
type ErrNotRunning ¶
type ErrNotRunning struct{}
func (ErrNotRunning) Error ¶ added in v0.17.0
func (ErrNotRunning) Error() string
type Factory ¶
type Factory interface {
Name() string
Usage() string
Priority(ctx context.Context, endpoint string, api dockerclient.APIClient, dialMeta map[string][]string) int
New(ctx context.Context, cfg InitConfig) (Driver, error)
AllowsInstances() bool
}
func GetDefaultFactory ¶
func GetFactories ¶ added in v0.3.0
type Feature ¶
type Feature string
const CacheExport Feature = "Cache export"
const DefaultLoad Feature = "Automatically load images to the Docker Engine image store"
const DirectPush Feature = "Direct push"
const DockerExporter Feature = "Docker exporter"
const MultiPlatform Feature = "Multi-platform build"
const OCIExporter Feature = "OCI exporter"
const PreferImageDigest Feature = "Prefer image digest"
type ImageVerifier ¶
type ImageVerifier func(ctx context.Context, ref string, platform *ocispecs.Platform, resolver policy.SourceMetadataResolver) (digest.Digest, error)
ImageVerifier validates the builder image ref against the builtin default policy and returns the digest that verification resolved the reference to. Drivers that materialize the builder from an image call it before creating the builder so the verified digest can be used instead of the mutable tag. Source metadata is resolved through the given resolver, which drivers back with a BuildKit instance they have access to so that registry access happens where the image is pulled from.
type InitConfig ¶
type InitConfig struct {
Name string
EndpointAddr string
DockerAPI dockerclient.APIClient
ContextStore store.Reader
BuildkitdFlags []string
Files map[string][]byte
DriverOpts map[string]string
Auth authprovider.AuthConfigProvider
ImageVerifier ImageVerifier
Platforms []ocispecs.Platform
ContextPathHash string
DialMeta map[string][]string
}
type UncachedClientDriver ¶
type UncachedClientDriver interface {
RequiresUncachedClient() bool
}