buildkit

package
v0.0.81 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultContainerName = "fn-buildkitd"
View Source
const SSHAgentProviderID = "default"

Variables

View Source
var (
	BuildkitSecrets string
	ForwardKeychain = false
)
View Source
var (
	ImportCacheVar = &cacheVar{}
	ExportCacheVar = &cacheVar{}
)
View Source
var File_internal_build_buildkit_devhost_proto protoreflect.FileDescriptor
View Source
var OverridesConfigType = cfg.DefineConfigType[*Overrides]()
View Source
var PreDigestLocalInputs = environment.IsRunningInCI()

XXX make this a flag instead. The assumption here is that in CI the filesystem is readonly.

View Source
var SkipExpectedMaxWorkspaceSizeCheck = false
View Source
var TaskOutputBuildkitJsonLog = tasks.Output("buildkit.json", "application/json+fn.buildkit")
View Source
var UsePlaintextLogging = false

Functions

func BuildDefinitionToImage

func BuildDefinitionToImage(env cfg.Context, conf build.BuildTarget, def *llb.Definition) compute.Computable[oci.Image]

func BuildFilesystem

func BuildFilesystem(ctx context.Context, conf cfg.Configuration, target build.BuildTarget, state llb.State, localDirs ...LocalContents) (compute.Computable[fs.FS], error)

func BuildImage

func BuildImage(ctx context.Context, env cfg.Context, conf build.BuildTarget, state llb.State, localDirs ...LocalContents) (compute.Computable[oci.Image], error)

func DockerfileBuild

func DockerfileBuild(rel, dockerfile string, isFocus bool) (build.Spec, error)

A Dockerfile build is always relative to the module it lives in. Within that module, what's the relative path to the context, and within that context, what's the relative path to the Dockerfile.

func HostPlatform

func HostPlatform() specs.Platform

func MakeLocalExcludes

func MakeLocalExcludes(src LocalContents) []string

func MakeLocalState

func MakeLocalState(src LocalContents) llb.State

func Prune

func Prune(ctx context.Context, cfg cfg.Configuration, targetPlatform specs.Platform) error

func RemoveBuildkitd

func RemoveBuildkitd(ctx context.Context) error

func Version

func Version() (string, error)

Types

type BuildkitAwareRegistry

type BuildkitAwareRegistry interface {
	CheckExportRequest(*GatewayClient, oci.AllocatedRepository) (*ExportToRegistryRequest, *ExportToRegistryRequest)
}

type ExportToRegistryRequest

type ExportToRegistryRequest struct {
	Name     string
	Insecure bool
}

type GatewayClient

type GatewayClient struct {
	*client.Client
	// contains filtered or unexported fields
}

func (*GatewayClient) UsesDocker

func (cli *GatewayClient) UsesDocker() bool

type Instance

type Instance struct {
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// contains filtered or unexported fields
}

Used by the runtime.

func EnsureBuildkitd

func EnsureBuildkitd(ctx context.Context, containerName string) (*Instance, error)

func (*Instance) Descriptor deprecated

func (*Instance) Descriptor() ([]byte, []int)

Deprecated: Use Instance.ProtoReflect.Descriptor instead.

func (*Instance) GetAddr

func (x *Instance) GetAddr() string

func (*Instance) ProtoMessage

func (*Instance) ProtoMessage()

func (*Instance) ProtoReflect

func (x *Instance) ProtoReflect() protoreflect.Message

func (*Instance) Reset

func (x *Instance) Reset()

func (*Instance) String

func (x *Instance) String() string

type LocalContents

type LocalContents struct {
	Module         build.Workspace
	Path           string
	ObserveChanges bool
	// For Web we apply special handling temporarily: not including the root tsconfig.json as it belongs to Node.js
	TemporaryIsWeb bool

	// If set, only files matching these patterns will be included in the state.
	IncludePatterns []string
	// Added to the base exclude patterns. Override include patterns: if a file matches both, it is not included.
	ExcludePatterns []string
}

func (LocalContents) Abs

func (l LocalContents) Abs() string

type Overrides

type Overrides struct {
	ContainerName string `protobuf:"bytes,1,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"`
	BuildkitAddr  string `protobuf:"bytes,2,opt,name=buildkit_addr,json=buildkitAddr,proto3" json:"buildkit_addr,omitempty"`
	// contains filtered or unexported fields
}

Used for configuration purposes.

func (*Overrides) Descriptor deprecated

func (*Overrides) Descriptor() ([]byte, []int)

Deprecated: Use Overrides.ProtoReflect.Descriptor instead.

func (*Overrides) GetBuildkitAddr

func (x *Overrides) GetBuildkitAddr() string

func (*Overrides) GetContainerName

func (x *Overrides) GetContainerName() string

func (*Overrides) ProtoMessage

func (*Overrides) ProtoMessage()

func (*Overrides) ProtoReflect

func (x *Overrides) ProtoReflect() protoreflect.Message

func (*Overrides) Reset

func (x *Overrides) Reset()

func (*Overrides) String

func (x *Overrides) String() string

Jump to

Keyboard shortcuts

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