# GRPC All The Way Down
Before we start, we need to know that we’re talking about GRPC. There’s good support for it for Go. There are two GRPC channels when talking to a BuildKit daemon. The first is the BuildKit socket, for which I believe the "buildx" command-line plugin is a client, which is used by clients to get a build started. The second is the communication channel between BuildKit and a frontend, distributed as an image, run as a container.
Roughly, the BuildKit socket client sends “build this, here’s the input” requests, and the buildkit daemon provides those to the frontend (or an internal library call that “knows” about Dockerfiles), which can use RPC to read parts of the input, decide which steps to take, and tell the buildkit daemon to perform them.
## The daemon socket
If we connect to the socket using [`grpcurl`](https://github.com/fullstorydev/grpcurl) `-unix -plaintext unix:///run/buildkit/buildkitd.sock list`, we actually see the daemon offering six distinct GRPC interfaces:
```
containerd.services.content.v1.Content
grpc.health.v1.Health
grpc.reflection.v1.ServerReflection
grpc.reflection.v1alpha.ServerReflection
moby.buildkit.v1.Control
moby.buildkit.v1.frontend.LLBBridge
opentelemetry.proto.collector.trace.v1.TraceService
```
## Interfaces: the first two that we’ll care about
For the sake of simplicity, we’ll limit ourselves to the Control and LLBBridge interfaces. We can revisit the other four if we determine that we need them, or that we want to try to emulate their expectations. We can take a closer look at Control and LLBBridge using grpcurl’s describe command to get a broad-strokes overview:
### moby.buildkit.v1.Control ("Control")
```protobuf
moby.buildkit.v1.Control is a service:
service Control {
rpc DiskUsage ( .moby.buildkit.v1.DiskUsageRequest ) returns ( .moby.buildkit.v1.DiskUsageResponse );
rpc Info ( .moby.buildkit.v1.InfoRequest ) returns ( .moby.buildkit.v1.InfoResponse );
rpc ListWorkers ( .moby.buildkit.v1.ListWorkersRequest ) returns ( .moby.buildkit.v1.ListWorkersResponse );
rpc ListenBuildHistory ( .moby.buildkit.v1.BuildHistoryRequest ) returns ( stream .moby.buildkit.v1.BuildHistoryEvent );
rpc Prune ( .moby.buildkit.v1.PruneRequest ) returns ( stream .moby.buildkit.v1.UsageRecord );
rpc Session ( stream .moby.buildkit.v1.BytesMessage ) returns ( stream .moby.buildkit.v1.BytesMessage );
rpc Solve ( .moby.buildkit.v1.SolveRequest ) returns ( .moby.buildkit.v1.SolveResponse );
rpc Status ( .moby.buildkit.v1.StatusRequest ) returns ( stream .moby.buildkit.v1.StatusResponse );
rpc UpdateBuildHistory ( .moby.buildkit.v1.UpdateBuildHistoryRequest ) returns ( .moby.buildkit.v1.UpdateBuildHistoryResponse );
}
```
### moby.buildkit.v1.frontend.LLBBridge ("LLBBridge")
```protobuf
moby.buildkit.v1.frontend.LLBBridge is a service:
service LLBBridge {
rpc Evaluate ( .moby.buildkit.v1.frontend.EvaluateRequest ) returns ( .moby.buildkit.v1.frontend.EvaluateResponse );
rpc ExecProcess ( stream .moby.buildkit.v1.frontend.ExecMessage ) returns ( stream .moby.buildkit.v1.frontend.ExecMessage );
rpc Inputs ( .moby.buildkit.v1.frontend.InputsRequest ) returns ( .moby.buildkit.v1.frontend.InputsResponse );
rpc NewContainer ( .moby.buildkit.v1.frontend.NewContainerRequest ) returns ( .moby.buildkit.v1.frontend.NewContainerResponse );
rpc Ping ( .moby.buildkit.v1.frontend.PingRequest ) returns ( .moby.buildkit.v1.frontend.PongResponse );
rpc ReadDir ( .moby.buildkit.v1.frontend.ReadDirRequest ) returns ( .moby.buildkit.v1.frontend.ReadDirResponse );
rpc ReadFile ( .moby.buildkit.v1.frontend.ReadFileRequest ) returns ( .moby.buildkit.v1.frontend.ReadFileResponse );
rpc ReleaseContainer ( .moby.buildkit.v1.frontend.ReleaseContainerRequest ) returns ( .moby.buildkit.v1.frontend.ReleaseContainerResponse );
rpc ResolveImageConfig ( .moby.buildkit.v1.frontend.ResolveImageConfigRequest ) returns ( .moby.buildkit.v1.frontend.ResolveImageConfigResponse );
rpc ResolveSourceMeta ( .moby.buildkit.v1.frontend.ResolveSourceMetaRequest ) returns ( .moby.buildkit.v1.frontend.ResolveSourceMetaResponse );
rpc Return ( .moby.buildkit.v1.frontend.ReturnRequest ) returns ( .moby.buildkit.v1.frontend.ReturnResponse );
rpc Solve ( .moby.buildkit.v1.frontend.SolveRequest ) returns ( .moby.buildkit.v1.frontend.SolveResponse );
rpc StatFile ( .moby.buildkit.v1.frontend.StatFileRequest ) returns ( .moby.buildkit.v1.frontend.StatFileResponse );
rpc Warn ( .moby.buildkit.v1.frontend.WarnRequest ) returns ( .moby.buildkit.v1.frontend.WarnResponse );
}
```
## Interfaces: Protobuf Definitions and Notes
The Control interface corresponds to [https://github.com/moby/buildkit/blob/master/api/services/control/control.proto](https://github.com/moby/buildkit/blob/master/api/services/control/control.proto), and the LLBBridge interface corresponds to [https://github.com/moby/buildkit/blob/master/frontend/gateway/pb/gateway.proto](https://github.com/moby/buildkit/blob/master/frontend/gateway/pb/gateway.proto).
Skimming those, we find some complications. In particular, Solve(), in both interfaces, includes a `Definition` parameter. It is this which is commonly referred to as an LLB description.
* A binary-encoded protobuf message that represents the build as a series of structs which are nodes ("vertexes") in a graph, transmitted as a slice where the position in the slice doesn’t necessarily correspond to anything. The binary encoding allows the vertex to be referred to by a digest of its encoded form elsewhere in the API.
* Graph nodes (vertexes) represent steps in the build, often but not always analogous to instructions in a Dockerfile. Realistically they’re more accurately thought of as directory trees, sometimes the result of layering, and sometimes with associated image configuration blobs.
* The connections between nodes (edges) in the graph represent dependencies between them, and can imply that an image may need to be committed for use as input to a node.
* "Completing" the step of the build that the node represents requires that the node(s) it depends on to have been completed first.
* If there is no ordering relationship (direct or indirect) between two nodes, they can be run in parallel.
* The full build graph is a `github.com/moby/buildkit/solver/pb.Definition`, or a `github.com/moby/buildkit/client/llb.Definition` if you’re building your own. It contains a slice of encoded "operation" structs, described by [https://github.com/moby/buildkit/blob/master/solver/pb/ops.proto](https://github.com/moby/buildkit/blob/master/solver/pb/ops.proto), each of which describes a step. It’s an expressive API.
### Implementation plan (tentative)
* Map each operation that can appear in the Definition to one or more lower-level buildah API calls, adding flags to those APIs as needed to allow them to provide compatible behavior. Expose those flags at the corresponding command line when they make sense, and to make it possible to test them in isolation.
* Build the scaffolding for a server side of these interfaces. Make sure it’s something podman can expose from its socket, for use by compose (which I *think* is exec’ing buildx) and if we want to be able to use a podman farm nodes to perform builds.
* If podman’s remote API can’t expose the API handler we’re looking to add, extend its client-server API to be able to include GRPC. Hard requirement.
* Get to a minimum server API implementation which can produce an image from a minimal Dockerfile, not necessarily in conformance with what BuildKit would produce, but enough to use as a starting point.
* Teach the conformance tests to test using a buildkitd socket and our in-process implementation.
* Expand the minimal case to invoke every instruction at least once.
* Expand the minimal case to invoke every flag of every instruction at least once.
* Test other frontends, including
* [https://github.com/r2d4/mockerfile](https://github.com/r2d4/mockerfile)
* [https://github.com/Azure/dalec](https://github.com/Azure/dalec)
* Point the buildx CLI plugin at a socket with our server implementations on it.
* Point compose at a socket with our server implementations on it.
The overall estimated effort required is large.
## \#syntax
* Specifies the name of a container image that will drive the build, from reading the Dockerfile (or equivalent) to producing the final output image. The .moby.buildkit.v1.Solve (Control) and .moby.buildkit.v1.frontend.SolveRequest (LLBBridge) requests both include a Frontend field which can indicate that the frontend image should be run to "drive" the request.
* The frontend image starts up and talks to the daemon’s LLBBridge interface over its stdio. I have not yet verified whether or not the daemon exposes other interfaces to the frontend.
* The "dockerfile" syntax is available in the "docker.io/docker/dockerfile" frontend image, which I guess can drive traffic to Docker Hub, though there’s an internal `github.com/moby/buildkit/frontend/dockerfile/dockerfile2llb.Dockerfile2LLB()` function which produces an object which can then be marshalled into a `Definition`. We’ll probably want to make using it a default for the sake of disconnected builds.
## Unanswered questions
* External cache: how do we export cache for multiple stages to a tagged reference in a registry so that we can import it elsewhere?
* Everything in one image? How do we do that for multistage builds, where each has its own rootfs that’s independent of the others?
* Use artifacts and implement push/pull layers directly instead of reusing the image library’s image copying logic?
* Using ImageSource.GetBlob() and ImageDestination.PutBlob()/Commit() to move cache layers in and out of storage would be significant work, limit us to what the image library knows how to talk to, and depends on the image library accepting our attempts to commit an image that might not include everything a proper image would.
* Use a manifest list, with one image manifest entry for each stage?
* We’d need to keep track of the ref for each layer, in a place that’s safe across format changes.
* Pushing the cache would require digesting every layer and building manifests for every stage.
* How do we conformance test this?
* Feed inputs to a buildx binary, pointed to both implementations listening sockets?
* Call RPCs for both implementations directly?
* Push the built images to a registry?
* Push the built images to an OCI layout? Or to a docker archive?
* Is this enough API to be able to use a podman farm to handle multi-architecture builds?
* Will podman desktop be able to use the GRPC interface to run builds, or does some of this need to be exposed as part of podman’s REST endpoint?
# Implementor Notes
Calls and fields in their associated request and response arguments, with structures inlined for convenience, except where recursion is possible.
A `Ref` is a string reference to the result of completing one operation in a definition, and refers to either a layer, which may itself be based on other layers, a source (a build context, content downloaded from a URL, an image, etc.), or an image.
One of the distinguishing features of BuildKit’s builds is that an image is only committed if it needs to be consumed externally (“exported”), even while multiple layers are used. To accomplish this, we’ll need to be able to create container records for layers which aren’t necessarily part of an image. While this isn’t something we expected to be able to do with the current storage library, it is something that its API should be able to accept with minor extensions (specifically, a flag that tells it to use an already-created layer, which we will have created directly beforehand, as a container’s read-write layer, rather than always attempting to create a new layer, as it does now). Alternatively, we can create image records for those layers at the level of the storage library, and while they will lack the metadata which would be required in order to export (push) them, the storage library should accept it. From prior experience, we should be ready in case creating such records triggers errors in other consumers of the storage library, as they currently expect images to always have manifests and configuration blobs available and in the correct formats.
The `Control` and `LLBBridge` services are available on the buildkit daemon’s socket, among others. I’m reasonably certain that only `LLBBridge` is offered to frontends being run during a build.
## Definition
* This is what we often describe as "LLB", but it’s more properly referred to as a `Definition` structure. It’s used as a parameter to both `Solve()` APIs, and is a central fixture in the API.
* `RemoveMountStubsRecursive` is not currently controlled by a flag in `RunOptions`, it would need to be extended to make that optional.
* `RunOptions` would probably be extended to accept `ValidExitCodes` other than 0\.
* There’s an open podman issue ([\#27188](https://github.com/containers/podman/issues/27188)) about us not supporting CacheOpt.Sharing \== private.
* What does `MountContentCache` control?
* Best to avoid implementing SecurityMode==insecure unless we have to.
* We currently error out in situations where `AllowEmptyWildcard` would matter.
* We don’t support ModeStr in `copier.Get()` and `copier.Put()`, but we have part of an implementation somewhere.
* We’ll need to implement `MkFile/Mkdir/Symlink` `File` ops. The current `copier.Mkdir()` and `copier.Ensure()` don’t overwrite targets, so if we wanted to reuse them, we’d need to add a flag to their options for requesting that behavior.
* The `Rm` `File` op `AllowWildcard` and `AllowNotFound` flags would need to be added to `copier.Remove()`.
* We should probably consider replacing the ad-hoc parent-child protocol in `copier` with standard json rpc. That’s been a long time coming.
* `Build` ops are marked as experimental, but if we implement them, what does its `Builder` integer field refer to?
* `Metadata.Caps` for sample builds should help us prioritize which API features to implement.
```go
{
// def is a list of marshaled Op messages
Def [][]byte `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"` {
// changes to this structure must be represented in json.go.
// inputs is a set of input edges.
Inputs []*Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` {
// digest of the marshaled input Op
Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
// output index of the input Op
Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
}
// Types that are valid to be assigned to Op:
//
// *Op_Exec {
// Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` {
// Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
// Env []string `protobuf:"bytes,2,rep,name=env,proto3" json:"env,omitempty"`
// Cwd string `protobuf:"bytes,3,opt,name=cwd,proto3" json:"cwd,omitempty"`
// User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
// ProxyEnv *ProxyEnv `protobuf:"bytes,5,opt,name=proxy_env,json=proxyEnv,proto3" json:"proxy_env,omitempty"` {
// HttpProxy string `protobuf:"bytes,1,opt,name=http_proxy,json=httpProxy,proto3" json:"http_proxy,omitempty"`
// HttpsProxy string `protobuf:"bytes,2,opt,name=https_proxy,json=httpsProxy,proto3" json:"https_proxy,omitempty"`
// FtpProxy string `protobuf:"bytes,3,opt,name=ftp_proxy,json=ftpProxy,proto3" json:"ftp_proxy,omitempty"`
// NoProxy string `protobuf:"bytes,4,opt,name=no_proxy,json=noProxy,proto3" json:"no_proxy,omitempty"`
// AllProxy string `protobuf:"bytes,5,opt,name=all_proxy,json=allProxy,proto3" json:"all_proxy,omitempty"`
// }
// ExtraHosts []*HostIP `protobuf:"bytes,6,rep,name=extraHosts,proto3" json:"extraHosts,omitempty"` {
// Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
// IP string `protobuf:"bytes,2,opt,name=IP,proto3" json:"IP,omitempty"`
// }
// Hostname string `protobuf:"bytes,7,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Ulimit []*Ulimit `protobuf:"bytes,9,rep,name=ulimit,proto3" json:"ulimit,omitempty"` {
// Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
// Soft int64 `protobuf:"varint,2,opt,name=Soft,proto3" json:"Soft,omitempty"`
// Hard int64 `protobuf:"varint,3,opt,name=Hard,proto3" json:"Hard,omitempty"`
// }
// CgroupParent string `protobuf:"bytes,10,opt,name=cgroupParent,proto3" json:"cgroupParent,omitempty"`
// RemoveMountStubsRecursive bool `protobuf:"varint,11,opt,name=removeMountStubsRecursive,proto3" json:"removeMountStubsRecursive,omitempty"`
// ValidExitCodes []int32 `protobuf:"varint,12,rep,packed,name=validExitCodes,proto3" json:"validExitCodes,omitempty"`
// }
// Mounts []*Mount `protobuf:"bytes,2,rep,name=mounts,proto3" json:"mounts,omitempty"` {
// Input int64 `protobuf:"varint,1,opt,name=input,proto3" json:"input,omitempty"`
// Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
// Dest string `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
// Output int64 `protobuf:"varint,4,opt,name=output,proto3" json:"output,omitempty"`
// Readonly bool `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
// MountType MountType (bind=0,secret=1,ssh=2,cache=3,tmpfs=4) `protobuf:"varint,6,opt,name=mountType,proto3,enum=pb.MountType" json:"mountType,omitempty"`
// TmpfsOpt *TmpfsOpt `protobuf:"bytes,19,opt,name=TmpfsOpt,proto3" json:"TmpfsOpt,omitempty"` {
// Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
// }
// CacheOpt *CacheOpt `protobuf:"bytes,20,opt,name=cacheOpt,proto3" json:"cacheOpt,omitempty"` {
// // ID is an optional namespace for the mount
// ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// // Sharing is the sharing mode for the mount
// Sharing CacheSharingOpt (shared=0,private=1,locked=2) `protobuf:"varint,2,opt,name=sharing,proto3,enum=pb.CacheSharingOpt" json:"sharing,omitempty"`
// }
// SecretOpt *SecretOpt `protobuf:"bytes,21,opt,name=secretOpt,proto3" json:"secretOpt,omitempty"` {
// // ID of secret. Used for querying the value.
// ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// // UID of secret file
// Uid uint32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
// // GID of secret file
// Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"`
// // Mode is the filesystem mode of secret file
// Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
// // Optional defines if secret value is required. Error is produced
// // if value is not found and optional is false.
// Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
// }
// SSHOpt *SSHOpt `protobuf:"bytes,22,opt,name=SSHOpt,proto3" json:"SSHOpt,omitempty"` {
// // ID of exposed ssh rule. Used for querying the value.
// ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// // UID of agent socket
// Uid uint32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
// // GID of agent socket
// Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"`
// // Mode is the filesystem mode of agent socket
// Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
// // Optional defines if ssh socket is required. Error is produced
// // if client does not expose ssh.
// Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
// }
// ResultID string `protobuf:"bytes,23,opt,name=resultID,proto3" json:"resultID,omitempty"`
// ContentCache MountContentCache (default=0,on=1,off=2) `protobuf:"varint,24,opt,name=contentCache,proto3,enum=pb.MountContentCache" json:"contentCache,omitempty"`
// }
// Network NetMode (unset=0,host=1,none=2) `protobuf:"varint,3,opt,name=network,proto3,enum=pb.NetMode" json:"network,omitempty"`
// Security SecurityMode (sandbox=0,insecure=1) `protobuf:"varint,4,opt,name=security,proto3,enum=pb.SecurityMode" json:"security,omitempty"`
// Secretenv []*SecretEnv `protobuf:"bytes,5,rep,name=secretenv,proto3" json:"secretenv,omitempty"` {
// ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Optional bool `protobuf:"varint,3,opt,name=optional,proto3" json:"optional,omitempty"`
// }
// CdiDevices []*CDIDevice `protobuf:"bytes,6,rep,name=cdiDevices,proto3" json:"cdiDevices,omitempty"` {
// // Fully qualified CDI device name (e.g., vendor.com/gpu=gpudevice1)
// // https://github.com/cncf-tags/container-device-interface/blob/main/SPEC.md
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// // Optional defines if CDI device is required.
// Optional bool `protobuf:"varint,2,opt,name=optional,proto3" json:"optional,omitempty"`
// }
// }
// *Op_Source {
// // TODO: use source type or any type instead of URL protocol.
// // identifier e.g. local://, docker-image://, git://, https://...
// Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// attrs are defined in attr.go
// Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// }
// *Op_File {
// Actions []*FileAction `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` {
// Input int64 `protobuf:"varint,1,opt,name=input,proto3" json:"input,omitempty"` // could be real input or target (target index + max input index)
// SecondaryInput int64 `protobuf:"varint,2,opt,name=secondaryInput,proto3" json:"secondaryInput,omitempty"` // --//--
// Output int64 `protobuf:"varint,3,opt,name=output,proto3" json:"output,omitempty"`
// // Types that are valid to be assigned to Action:
// *FileAction_Copy { // copies files from secondaryInput on top of input
// // src is the source path
// Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
// // dest path
// Dest string `protobuf:"bytes,2,opt,name=dest,proto3" json:"dest,omitempty"`
// // optional owner override
// Owner *ChownOpt `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` {
// User *UserOpt `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// Group *UserOpt `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// }
// // optional permission bits override
// Mode int32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
// // followSymlink resolves symlinks in src
// FollowSymlink bool `protobuf:"varint,5,opt,name=followSymlink,proto3" json:"followSymlink,omitempty"`
// // dirCopyContents only copies contents if src is a directory
// DirCopyContents bool `protobuf:"varint,6,opt,name=dirCopyContents,proto3" json:"dirCopyContents,omitempty"`
// // attemptUnpackDockerCompatibility detects if src is an archive to unpack it instead
// AttemptUnpackDockerCompatibility bool `protobuf:"varint,7,opt,name=attemptUnpackDockerCompatibility,proto3" json:"attemptUnpackDockerCompatibility,omitempty"`
// // createDestPath creates dest path directories if needed
// CreateDestPath bool `protobuf:"varint,8,opt,name=createDestPath,proto3" json:"createDestPath,omitempty"`
// // allowWildcard allows filepath.Match wildcards in src path
// AllowWildcard bool `protobuf:"varint,9,opt,name=allowWildcard,proto3" json:"allowWildcard,omitempty"`
// // allowEmptyWildcard doesn't fail the whole copy if wildcard doesn't resolve to files
// AllowEmptyWildcard bool `protobuf:"varint,10,opt,name=allowEmptyWildcard,proto3" json:"allowEmptyWildcard,omitempty"`
// // optional created time override
// Timestamp int64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// // include only files/dirs matching at least one of these patterns
// IncludePatterns []string `protobuf:"bytes,12,rep,name=include_patterns,json=includePatterns,proto3" json:"include_patterns,omitempty"`
// // exclude files/dir matching any of these patterns (even if they match an include pattern)
// ExcludePatterns []string `protobuf:"bytes,13,rep,name=exclude_patterns,json=excludePatterns,proto3" json:"exclude_patterns,omitempty"`
// // alwaysReplaceExistingDestPaths results in an existing dest path that differs in type from the src path being replaced rather than the default of returning an error
// AlwaysReplaceExistingDestPaths bool `protobuf:"varint,14,opt,name=alwaysReplaceExistingDestPaths,proto3" json:"alwaysReplaceExistingDestPaths,omitempty"`
// // mode in non-octal format
// ModeStr string `protobuf:"bytes,15,opt,name=modeStr,proto3" json:"modeStr,omitempty"`
// }
// *FileAction_Mkfile {
// // path for the new file
// Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
// // permission bits
// Mode int32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"`
// // data is the new file contents
// Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// // optional owner for the new file
// Owner *ChownOpt `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` {
// User *UserOpt `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// Group *UserOpt `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// }
// // optional created time override
// Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// }
// *FileAction_Mkdir {
// // path for the new directory
// Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
// // permission bits
// Mode int32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"`
// // makeParents creates parent directories as well if needed
// MakeParents bool `protobuf:"varint,3,opt,name=makeParents,proto3" json:"makeParents,omitempty"`
// // optional owner for the new directory
// Owner *ChownOpt `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` {
// User *UserOpt `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// Group *UserOpt `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// }
// // optional created time override
// Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// }
// *FileAction_Rm {
// // path to remove
// Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
// // allowNotFound doesn't fail the rm if file is not found
// AllowNotFound bool `protobuf:"varint,2,opt,name=allowNotFound,proto3" json:"allowNotFound,omitempty"`
// // allowWildcard allows filepath.Match wildcards in path
// AllowWildcard bool `protobuf:"varint,3,opt,name=allowWildcard,proto3" json:"allowWildcard,omitempty"`
// }
// *FileAction_Symlink {
// // destination path for the new file representing the link
// Oldpath string `protobuf:"bytes,1,opt,name=oldpath,proto3" json:"oldpath,omitempty"`
// // source path for the link
// Newpath string `protobuf:"bytes,2,opt,name=newpath,proto3" json:"newpath,omitempty"`
// // optional owner for the new file
// Owner *ChownOpt `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` {
// User *UserOpt `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// Group *UserOpt `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` {
// // Types that are valid to be assigned to User:
// *UserOpt_ByName {
// ByName *NamedUserOpt `protobuf:"bytes,1,opt,name=byName,proto3,oneof"` {
// Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Input int64 `protobuf:"varint,2,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *UserOpt_ByID {
// ByID uint32 `protobuf:"varint,2,opt,name=byID,proto3,oneof"`
// }
// }
// }
// // optional created time override
// Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// }
// Action isFileAction_Action `protobuf_oneof:"action"`
// }
// }
// *Op_Build {
// Builder int64 `protobuf:"varint,1,opt,name=builder,proto3" json:"builder,omitempty"`
// Inputs map[string]*BuildInput `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
// Input int64 `protobuf:"varint,1,opt,name=input,proto3" json:"input,omitempty"`
// }
// Def *Definition `protobuf:"bytes,3,opt,name=def,proto3" json:"def,omitempty"`
// Attrs map[string]string `protobuf:"bytes,4,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // outputs
// }
// *Op_Merge {
// Inputs []*MergeInput `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` {
// Input int64 `protobuf:"varint,1,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
// *Op_Diff {
// Lower *LowerDiffInput `protobuf:"bytes,1,opt,name=lower,proto3" json:"lower,omitempty"` {
// Input int64 `protobuf:"varint,1,opt,name=input,proto3" json:"input,omitempty"`
// }
// Upper *UpperDiffInput `protobuf:"bytes,2,opt,name=upper,proto3" json:"upper,omitempty"` {
// Input int64 `protobuf:"varint,1,opt,name=input,proto3" json:"input,omitempty"`
// }
// }
Op isOp_Op `protobuf_oneof:"op"`
Platform *Platform `protobuf:"bytes,10,opt,name=platform,proto3" json:"platform,omitempty"` {
Architecture string `protobuf:"bytes,1,opt,name=Architecture,proto3" json:"Architecture,omitempty"`
OS string `protobuf:"bytes,2,opt,name=OS,proto3" json:"OS,omitempty"`
Variant string `protobuf:"bytes,3,opt,name=Variant,proto3" json:"Variant,omitempty"`
OSVersion string `protobuf:"bytes,4,opt,name=OSVersion,proto3" json:"OSVersion,omitempty"`
OSFeatures []string `protobuf:"bytes,5,rep,name=OSFeatures,proto3" json:"OSFeatures,omitempty"` // unused
}
Constraints *WorkerConstraints `protobuf:"bytes,11,opt,name=constraints,proto3" json:"constraints,omitempty"` {
Filter []string `protobuf:"bytes,1,rep,name=filter,proto3" json:"filter,omitempty"` // containerd-style filter
}
}
// metadata contains metadata for each of the Op messages.
// A key must be the digest of an LLB op. Currently, empty string is not expected as a key, but it may change in the future.
Metadata map[string]*OpMetadata `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
// ignore_cache specifies to ignore the cache for this Op.
IgnoreCache bool `protobuf:"varint,1,opt,name=ignore_cache,json=ignoreCache,proto3" json:"ignore_cache,omitempty"`
// Description can be used for keeping any text fields that builder doesn't parse
Description map[string]string `protobuf:"bytes,2,rep,name=description,proto3" json:"description,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// index 3 reserved for WorkerConstraint in previous versions
// WorkerConstraint worker_constraint = 3;
ExportCache *ExportCache `protobuf:"bytes,4,opt,name=export_cache,json=exportCache,proto3" json:"export_cache,omitempty"` {
Value bool `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"`
}
// keys are apicaps.CapID values defined in caps.go
Caps map[string]bool `protobuf:"bytes,5,rep,name=caps,proto3" json:"caps,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
ProgressGroup *ProgressGroup `protobuf:"bytes,6,opt,name=progress_group,json=progressGroup,proto3" json:"progress_group,omitempty"` {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Weak bool `protobuf:"varint,3,opt,name=weak,proto3" json:"weak,omitempty"`
}
}
// Source contains the source mapping information for the vertexes in the definition
Source *Source `protobuf:"bytes,3,opt,name=Source,proto3" json:"Source,omitempty"` {
Locations map[string]*Locations `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
Locations []*Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"` {
SourceIndex int32 `protobuf:"varint,1,opt,name=sourceIndex,proto3" json:"sourceIndex,omitempty"`
Ranges []*Range `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"`` {
Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
Character int32 `protobuf:"varint,2,opt,name=character,proto3" json:"character,omitempty"`
}
}
}
Infos []*SourceInfo `protobuf:"bytes,2,rep,name=infos,proto3" json:"infos,omitempty"` {
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Definition *Definition `protobuf:"bytes,3,opt,name=definition,proto3" json:"definition,omitempty"`
Language string `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"`
}
}
}
```
## Control.DiskUsage
### Request
```go
Filter []string `protobuf:"bytes,1,rep,name=filter,proto3" json:"filter,omitempty"`
AgeLimit int64 `protobuf:"varint,2,opt,name=ageLimit,proto3" json:"ageLimit,omitempty"`
```
### Response
```go
Record []UsageRecord {
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Mutable bool `protobuf:"varint,2,opt,name=Mutable,proto3" json:"Mutable,omitempty"`
InUse bool `protobuf:"varint,3,opt,name=InUse,proto3" json:"InUse,omitempty"`
Size int64 `protobuf:"varint,4,opt,name=Size,proto3" json:"Size,omitempty"`
Parent string `protobuf:"bytes,5,opt,name=Parent,proto3" json:"Parent,omitempty"` // Deprecated
CreatedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
LastUsedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=LastUsedAt,proto3" json:"LastUsedAt,omitempty"`
UsageCount int64 `protobuf:"varint,8,opt,name=UsageCount,proto3" json:"UsageCount,omitempty"`
Description string `protobuf:"bytes,9,opt,name=Description,proto3" json:"Description,omitempty"`
RecordType string `protobuf:"bytes,10,opt,name=RecordType,proto3" json:"RecordType,omitempty"`
Shared bool `protobuf:"varint,11,opt,name=Shared,proto3" json:"Shared,omitempty"`
Parents []string `protobuf:"bytes,12,rep,name=Parents,proto3" json:"Parents,omitempty"`
}
```
## Control.Info
### Request
(no fields)
### Response
Set Package and Version per our “define” package, Revision is for a version control system identifier.
```go
BuildKitVersion {
Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"`
}
```
## Control.ListWorkers
### Request
```go
Filter []string `protobuf:"bytes,1,rep,name=filter,proto3" json:"filter,omitempty"` // containerd style
```
### Response
```go
Record []{
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Labels map[string]string `protobuf:"bytes,2,rep,name=Labels,proto3" json:"Labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Platforms []*pb.Platform `protobuf:"bytes,3,rep,name=platforms,proto3" json:"platforms,omitempty"` {
Architecture string `protobuf:"bytes,1,opt,name=Architecture,proto3" json:"Architecture,omitempty"`
OS string `protobuf:"bytes,2,opt,name=OS,proto3" json:"OS,omitempty"`
Variant string `protobuf:"bytes,3,opt,name=Variant,proto3" json:"Variant,omitempty"`
OSVersion string `protobuf:"bytes,4,opt,name=OSVersion,proto3" json:"OSVersion,omitempty"`
OSFeatures []string `protobuf:"bytes,5,rep,name=OSFeatures,proto3" json:"OSFeatures,omitempty"` // unused
}
GCPolicy []*GCPolicy `protobuf:"bytes,4,rep,name=GCPolicy,proto3" json:"GCPolicy,omitempty"` {
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
KeepDuration int64 `protobuf:"varint,2,opt,name=keepDuration,proto3" json:"keepDuration,omitempty"`
Filters []string `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"`
// reservedSpace was renamed from freeBytes
ReservedSpace int64 `protobuf:"varint,3,opt,name=reservedSpace,proto3" json:"reservedSpace,omitempty"`
MaxUsedSpace int64 `protobuf:"varint,5,opt,name=maxUsedSpace,proto3" json:"maxUsedSpace,omitempty"`
MinFreeSpace int64 `protobuf:"varint,6,opt,name=minFreeSpace,proto3" json:"minFreeSpace,omitempty"`
}
BuildkitVersion *BuildkitVersion `protobuf:"bytes,5,opt,name=BuildkitVersion,proto3" json:"BuildkitVersion,omitempty"` {
Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"`
}
CDIDevices []*CDIDevice `protobuf:"bytes,6,rep,name=CDIDevices,proto3" json:"CDIDevices,omitempty"`{
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
AutoAllow bool `protobuf:"varint,2,opt,name=AutoAllow,proto3" json:"AutoAllow,omitempty"`
Annotations map[string]string `protobuf:"bytes,3,rep,name=Annotations,proto3" json:"Annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
OnDemand bool `protobuf:"varint,4,opt,name=OnDemand,proto3" json:"OnDemand,omitempty"`
}
}
```
## Control.ListenBuildHistory
### Request (BuildHistoryRequest)
```go
ActiveOnly bool `protobuf:"varint,1,opt,name=ActiveOnly,proto3" json:"ActiveOnly,omitempty"`
Ref string `protobuf:"bytes,2,opt,name=Ref,proto3" json:"Ref,omitempty"`
EarlyExit bool `protobuf:"varint,3,opt,name=EarlyExit,proto3" json:"EarlyExit,omitempty"`
Filter []string `protobuf:"bytes,4,rep,name=Filter,proto3" json:"Filter,omitempty"`
Limit int32 `protobuf:"varint,5,opt,name=Limit,proto3" json:"Limit,omitempty"`
```
### Response (stream of BuildHistoryEvent)
```go
Type BuildHistoryEventType (started=0,completed=1,deleted=2) `protobuf:"varint,1,opt,name=type,proto3,enum=moby.buildkit.v1.BuildHistoryEventType" json:"type,omitempty"`
Record *BuildHistoryRecord `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` {
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
Frontend string `protobuf:"bytes,2,opt,name=Frontend,proto3" json:"Frontend,omitempty"`
FrontendAttrs map[string]string `protobuf:"bytes,3,rep,name=FrontendAttrs,proto3" json:"FrontendAttrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Exporters []*Exporter `protobuf:"bytes,4,rep,name=Exporters,proto3" json:"Exporters,omitempty"` {
Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
Error *status.Status `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` {
// The status code, which should be an enum value of
// [google.rpc.Code][google.rpc.Code].
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized
// by the client.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// A list of messages that carry the error details. There is a common set of
// message types for APIs to use.
Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"`
}
CreatedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
CompletedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=CompletedAt,proto3" json:"CompletedAt,omitempty"`
Logs *Descriptor `protobuf:"bytes,8,opt,name=logs,proto3" json:"logs,omitempty"` {
MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
ExporterResponse map[string]string `protobuf:"bytes,9,rep,name=ExporterResponse,proto3" json:"ExporterResponse,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Result *BuildResultInfo `protobuf:"bytes,10,opt,name=Result,proto3" json:"Result,omitempty"` {
Attestations []*Descriptor `protobuf:"bytes,2,rep,name=Attestations,proto3" json:"Attestations,omitempty"` {
MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
Results map[int64]*Descriptor `protobuf:"bytes,3,rep,name=Results,proto3" json:"Results,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
}
Results map[string]*BuildResultInfo `protobuf:"bytes,11,rep,name=Results,proto3" json:"Results,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
Attestations []*Descriptor `protobuf:"bytes,2,rep,name=Attestations,proto3" json:"Attestations,omitempty"` {
MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
Results map[int64]*Descriptor `protobuf:"bytes,3,rep,name=Results,proto3" json:"Results,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
}
Generation int32 `protobuf:"varint,12,opt,name=Generation,proto3" json:"Generation,omitempty"`
Trace *Descriptor `protobuf:"bytes,13,opt,name=trace,proto3" json:"trace,omitempty"` {
MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
Pinned bool `protobuf:"varint,14,opt,name=pinned,proto3" json:"pinned,omitempty"`
NumCachedSteps int32 `protobuf:"varint,15,opt,name=numCachedSteps,proto3" json:"numCachedSteps,omitempty"`
NumTotalSteps int32 `protobuf:"varint,16,opt,name=numTotalSteps,proto3" json:"numTotalSteps,omitempty"`
NumCompletedSteps int32 `protobuf:"varint,17,opt,name=numCompletedSteps,proto3" json:"numCompletedSteps,omitempty"`
ExternalError *Descriptor `protobuf:"bytes,18,opt,name=externalError,proto3" json:"externalError,omitempty"` {
MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
NumWarnings int32 `protobuf:"varint,19,opt,name=numWarnings,proto3" json:"numWarnings,omitempty"`
}
```
## Control.Prune
### Request
```go
Filter []string `protobuf:"bytes,1,rep,name=filter,proto3" json:"filter,omitempty"`
All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"`
KeepDuration int64 `protobuf:"varint,3,opt,name=keepDuration,proto3" json:"keepDuration,omitempty"`
ReservedSpace int64 `protobuf:"varint,4,opt,name=reservedSpace,proto3" json:"reservedSpace,omitempty"`
MaxUsedSpace int64 `protobuf:"varint,5,opt,name=maxUsedSpace,proto3" json:"maxUsedSpace,omitempty"`
MinFreeSpace int64 `protobuf:"varint,6,opt,name=minFreeSpace,proto3" json:"minFreeSpace,omitempty"`
```
### Response (stream of UsageRecord)
```go
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Mutable bool `protobuf:"varint,2,opt,name=Mutable,proto3" json:"Mutable,omitempty"`
InUse bool `protobuf:"varint,3,opt,name=InUse,proto3" json:"InUse,omitempty"`
Size int64 `protobuf:"varint,4,opt,name=Size,proto3" json:"Size,omitempty"`
Parent string `protobuf:"bytes,5,opt,name=Parent,proto3" json:"Parent,omitempty"` // Deprecated
CreatedAt *timestamp.Timestamp `protobuf:"bytes,6,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
LastUsedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=LastUsedAt,proto3" json:"LastUsedAt,omitempty"`
UsageCount int64 `protobuf:"varint,8,opt,name=UsageCount,proto3" json:"UsageCount,omitempty"`
Description string `protobuf:"bytes,9,opt,name=Description,proto3" json:"Description,omitempty"`
RecordType string `protobuf:"bytes,10,opt,name=RecordType,proto3" json:"RecordType,omitempty"`
Shared bool `protobuf:"varint,11,opt,name=Shared,proto3" json:"Shared,omitempty"`
Parents []string `protobuf:"bytes,12,rep,name=Parents,proto3" json:"Parents,omitempty"`
```
## Control.Session
Sets up a subchannel for e.g. transferring content from client-side build context directories to the frontend or for other file operations.
### Request
### Response (bidirectional stream of requests)
## Control.Solve
### Request
Note that the `Definition` field is not inlined.
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
Definition *pb.Definition `protobuf:"bytes,2,opt,name=Definition,proto3" json:"Definition,omitempty"`
// ExporterDeprecated and ExporterAttrsDeprecated are deprecated in favor
// of the new Exporters. If these fields are set, then they will be
// appended to the Exporters field if Exporters was not explicitly set.
ExporterDeprecated string `protobuf:"bytes,3,opt,name=ExporterDeprecated,proto3" json:"ExporterDeprecated,omitempty"`
ExporterAttrsDeprecated map[string]string `protobuf:"bytes,4,rep,name=ExporterAttrsDeprecated,proto3" json:"ExporterAttrsDeprecated,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Session string `protobuf:"bytes,5,opt,name=Session,proto3" json:"Session,omitempty"`
Frontend string `protobuf:"bytes,6,opt,name=Frontend,proto3" json:"Frontend,omitempty"`
FrontendAttrs map[string]string `protobuf:"bytes,7,rep,name=FrontendAttrs,proto3" json:"FrontendAttrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Cache *CacheOptions `protobuf:"bytes,8,opt,name=Cache,proto3" json:"Cache,omitempty"` {
// ExportRefDeprecated is deprecated in favor of the new Exports since BuildKit v0.4.0.
// When ExportRefDeprecated is set, the solver appends
// {.Type = "registry", .Attrs = ExportAttrs.add("ref", ExportRef)}
// to Exports for compatibility. (planned to be removed)
ExportRefDeprecated string `protobuf:"bytes,1,opt,name=ExportRefDeprecated,proto3" json:"ExportRefDeprecated,omitempty"`
// ImportRefsDeprecated is deprecated in favor or the new Imports since BuildKit v0.4.0.
// When ImportRefsDeprecated is set, the solver appends
// {.Type = "registry", .Attrs = {"ref": importRef}}
// for each of the ImportRefs entry to Imports for compatibility. (planned to be removed)
ImportRefsDeprecated []string `protobuf:"bytes,2,rep,name=ImportRefsDeprecated,proto3" json:"ImportRefsDeprecated,omitempty"`
// ExportAttrsDeprecated is deprecated since BuildKit v0.4.0.
// See the description of ExportRefDeprecated.
ExportAttrsDeprecated map[string]string `protobuf:"bytes,3,rep,name=ExportAttrsDeprecated,proto3" json:"ExportAttrsDeprecated,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Exports was introduced in BuildKit v0.4.0.
Exports []*CacheOptionsEntry `protobuf:"bytes,4,rep,name=Exports,proto3" json:"Exports,omitempty"` {
Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
// Attrs are like mode=(min,max), ref=example.com:5000/foo/bar .
// See cache importer/exporter implementations' documentation.
Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
// Imports was introduced in BuildKit v0.4.0.
Imports []*CacheOptionsEntry `protobuf:"bytes,5,rep,name=Imports,proto3" json:"Imports,omitempty"` {
Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
// Attrs are like mode=(min,max), ref=example.com:5000/foo/bar .
// See cache importer/exporter implementations' documentation.
Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
}
Entitlements []string `protobuf:"bytes,9,rep,name=Entitlements,proto3" json:"Entitlements,omitempty"`
FrontendInputs map[string]*pb.Definition `protobuf:"bytes,10,rep,name=FrontendInputs,proto3" json:"FrontendInputs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Internal bool `protobuf:"varint,11,opt,name=Internal,proto3" json:"Internal,omitempty"` // Internal builds are not recorded in build history
SourcePolicy *pb1.Policy `protobuf:"bytes,12,opt,name=SourcePolicy,proto3" json:"SourcePolicy,omitempty"` {
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // Currently 1
Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` {
Action PolicyAction (allow=0,deny=1,convert=2) `protobuf:"varint,1,opt,name=action,proto3,enum=moby.buildkit.v1.sourcepolicy.PolicyAction" json:"action,omitempty"`
Selector *Selector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// MatchType is the type of match to perform on the source identifier
MatchType MatchType (wildcard=0,exact=1,regex=2) `protobuf:"varint,2,opt,name=match_type,json=matchType,proto3,enum=moby.buildkit.v1.sourcepolicy.MatchType" json:"match_type,omitempty"`
Constraints []*AttrConstraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"` {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Condition AttrMatch (equal=0,notequal=1,matches=2) `protobuf:"varint,3,opt,name=condition,proto3,enum=moby.buildkit.v1.sourcepolicy.AttrMatch" json:"condition,omitempty"`
}
}
Updates *Update `protobuf:"bytes,3,opt,name=updates,proto3" json:"updates,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
}
}
Exporters []*Exporter `protobuf:"bytes,13,rep,name=Exporters,proto3" json:"Exporters,omitempty"` {
Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
EnableSessionExporter bool `protobuf:"varint,14,opt,name=EnableSessionExporter,proto3" json:"EnableSessionExporter,omitempty"`
```
### Response
```go
ExporterResponse map[string]string `protobuf:"bytes,1,rep,name=ExporterResponse,proto3" json:"ExporterResponse,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
```
## Control.Status
### Request
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
```
### Response
```go
Vertexes []*Vertex `protobuf:"bytes,1,rep,name=vertexes,proto3" json:"vertexes,omitempty"` {
Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
Inputs []string `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Cached bool `protobuf:"varint,4,opt,name=cached,proto3" json:"cached,omitempty"`
Started *timestamp.Timestamp `protobuf:"bytes,5,opt,name=started,proto3" json:"started,omitempty"`
Completed *timestamp.Timestamp `protobuf:"bytes,6,opt,name=completed,proto3" json:"completed,omitempty"`
Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` // typed errors?
ProgressGroup *pb.ProgressGroup `protobuf:"bytes,8,opt,name=progressGroup,proto3" json:"progressGroup,omitempty"` {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Weak bool `protobuf:"varint,3,opt,name=weak,proto3" json:"weak,omitempty"`
}
}
Statuses []*VertexStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"` {
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Vertex string `protobuf:"bytes,2,opt,name=vertex,proto3" json:"vertex,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Current int64 `protobuf:"varint,4,opt,name=current,proto3" json:"current,omitempty"`
Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
Timestamp *timestamp.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Started *timestamp.Timestamp `protobuf:"bytes,7,opt,name=started,proto3" json:"started,omitempty"`
Completed *timestamp.Timestamp `protobuf:"bytes,8,opt,name=completed,proto3" json:"completed,omitempty"`
}
Logs []*VertexLog `protobuf:"bytes,3,rep,name=logs,proto3" json:"logs,omitempty"` {
Vertex string `protobuf:"bytes,1,opt,name=vertex,proto3" json:"vertex,omitempty"`
Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Stream int64 `protobuf:"varint,3,opt,name=stream,proto3" json:"stream,omitempty"`
Msg []byte `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"`
}
Warnings []*VertexWarning `protobuf:"bytes,4,rep,name=warnings,proto3" json:"warnings,omitempty"` {
Vertex string `protobuf:"bytes,1,opt,name=vertex,proto3" json:"vertex,omitempty"`
Level int64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"`
Short []byte `protobuf:"bytes,3,opt,name=short,proto3" json:"short,omitempty"`
Detail [][]byte `protobuf:"bytes,4,rep,name=detail,proto3" json:"detail,omitempty"`
Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
Info *pb.SourceInfo `protobuf:"bytes,6,opt,name=info,proto3" json:"info,omitempty"` {
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Definition *Definition `protobuf:"bytes,3,opt,name=definition,proto3" json:"definition,omitempty"`
Language string `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"`
}
Ranges []*pb.Range `protobuf:"bytes,7,rep,name=ranges,proto3" json:"ranges,omitempty"` {
Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` {
Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
Character int32 `protobuf:"varint,2,opt,name=character,proto3" json:"character,omitempty"`
}
End *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` {
Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
Character int32 `protobuf:"varint,2,opt,name=character,proto3" json:"character,omitempty"`
}
}
}
```
## Control.UpdateBuildHistory
### Request
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
Pinned bool `protobuf:"varint,2,opt,name=Pinned,proto3" json:"Pinned,omitempty"`
Delete bool `protobuf:"varint,3,opt,name=Delete,proto3" json:"Delete,omitempty"`
Finalize bool `protobuf:"varint,4,opt,name=Finalize,proto3" json:"Finalize,omitempty"`
```
### Response
(no fields)
## LLBBridge.Evaluate
### Request
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
```
### Response
(no fields)
## LLBBridge.ExecProcess
### Request
(no fields)
### Response (bidirectional stream of ExecMessage)
```go
ProcessID string `protobuf:"bytes,1,opt,name=ProcessID,proto3" json:"ProcessID,omitempty"`
// Types that are valid to be assigned to Input:
//
// *ExecMessage_Init {
// // InitMessage sent from client to server will start a new process in a container
// Init *InitMessage `protobuf:"bytes,2,opt,name=Init,proto3,oneof"` {
// ContainerID string `protobuf:"bytes,1,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"`
// Meta *pb.Meta `protobuf:"bytes,2,opt,name=Meta,proto3" json:"Meta,omitempty"` {
// Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
// Env []string `protobuf:"bytes,2,rep,name=env,proto3" json:"env,omitempty"`
// Cwd string `protobuf:"bytes,3,opt,name=cwd,proto3" json:"cwd,omitempty"`
// User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
// ProxyEnv *ProxyEnv `protobuf:"bytes,5,opt,name=proxy_env,json=proxyEnv,proto3" json:"proxy_env,omitempty"` {
// HttpProxy string `protobuf:"bytes,1,opt,name=http_proxy,json=httpProxy,proto3" json:"http_proxy,omitempty"`
// HttpsProxy string `protobuf:"bytes,2,opt,name=https_proxy,json=httpsProxy,proto3" json:"https_proxy,omitempty"`
// FtpProxy string `protobuf:"bytes,3,opt,name=ftp_proxy,json=ftpProxy,proto3" json:"ftp_proxy,omitempty"`
// NoProxy string `protobuf:"bytes,4,opt,name=no_proxy,json=noProxy,proto3" json:"no_proxy,omitempty"`
// AllProxy string `protobuf:"bytes,5,opt,name=all_proxy,json=allProxy,proto3" json:"all_proxy,omitempty"`
// }
// ExtraHosts []*HostIP `protobuf:"bytes,6,rep,name=extraHosts,proto3" json:"extraHosts,omitempty"` {
// Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
// IP string `protobuf:"bytes,2,opt,name=IP,proto3" json:"IP,omitempty"`
// }
// Hostname string `protobuf:"bytes,7,opt,name=hostname,proto3" json:"hostname,omitempty"`
// Ulimit []*Ulimit `protobuf:"bytes,9,rep,name=ulimit,proto3" json:"ulimit,omitempty"` {
// Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
// Soft int64 `protobuf:"varint,2,opt,name=Soft,proto3" json:"Soft,omitempty"`
// Hard int64 `protobuf:"varint,3,opt,name=Hard,proto3" json:"Hard,omitempty"`
// }
// CgroupParent string `protobuf:"bytes,10,opt,name=cgroupParent,proto3" json:"cgroupParent,omitempty"`
// RemoveMountStubsRecursive bool `protobuf:"varint,11,opt,name=removeMountStubsRecursive,proto3" json:"removeMountStubsRecursive,omitempty"`
// ValidExitCodes []int32 `protobuf:"varint,12,rep,packed,name=validExitCodes,proto3" json:"validExitCodes,omitempty"`
// Fds []uint32 `protobuf:"varint,3,rep,packed,name=Fds,proto3" json:"Fds,omitempty"`
// }
// Tty bool `protobuf:"varint,4,opt,name=Tty,proto3" json:"Tty,omitempty"`
// Security pb.SecurityMode (sandbox=0,insecure=1) `protobuf:"varint,5,opt,name=Security,proto3,enum=pb.SecurityMode" json:"Security,omitempty"`
// Secretenv []*pb.SecretEnv `protobuf:"bytes,6,rep,name=secretenv,proto3" json:"secretenv,omitempty"` {
// ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Optional bool `protobuf:"varint,3,opt,name=optional,proto3" json:"optional,omitempty"`
// }
// }
// }
// *ExecMessage_File {
// // FdMessage used from client to server for input (stdin) and from server to client for output (stdout, stderr)
// File *FdMessage `protobuf:"bytes,3,opt,name=File,proto3,oneof"` {
// Fd uint32 `protobuf:"varint,1,opt,name=Fd,proto3" json:"Fd,omitempty"` // what fd the data was from
// EOF bool `protobuf:"varint,2,opt,name=EOF,proto3" json:"EOF,omitempty"` // true if eof was reached
// Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
// }
// }
// *ExecMessage_Resize {
// // ResizeMessage used from client to server for terminal resize events
// Resize *ResizeMessage `protobuf:"bytes,4,opt,name=Resize,proto3,oneof"` {
// Rows uint32 `protobuf:"varint,1,opt,name=Rows,proto3" json:"Rows,omitempty"`
// Cols uint32 `protobuf:"varint,2,opt,name=Cols,proto3" json:"Cols,omitempty"`
// }
// }
// *ExecMessage_Started {
// // StartedMessage sent from server to client after InitMessage to
// // indicate the process has started.
// Started *StartedMessage `protobuf:"bytes,5,opt,name=Started,proto3,oneof"` {
// (no fields)
// }
// }
// *ExecMessage_Exit {
// // ExitMessage sent from server to client will contain the exit code
// // when the process ends.
// Exit *ExitMessage `protobuf:"bytes,6,opt,name=Exit,proto3,oneof"`
// Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
// Error *status.Status `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"`
// }
// *ExecMessage_Done {
// // DoneMessage from server to client will be the last message for any
// // process. Note that FdMessage might be sent after ExitMessage.
// Done *DoneMessage `protobuf:"bytes,7,opt,name=Done,proto3,oneof"` {
// (no fields)
// }
// }
// *ExecMessage_Signal {
// // SignalMessage is used from client to server to send signal events
// Signal *SignalMessage `protobuf:"bytes,8,opt,name=Signal,proto3,oneof"` {
// // we only send name (ie HUP, INT) because the int values are platform dependent.
// Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
// }
// }
Input isExecMessage_Input `protobuf_oneof:"Input"`
```
## LLBBridge.Inputs
### Request
(no fields)
### Response
```go
Definitions map[string]*pb.Definition `protobuf:"bytes,1,rep,name=Definitions,proto3" json:"Definitions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
```
## LLBBridge.NewContainer
### Request
```go
ContainerID string `protobuf:"bytes,1,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"`
// For mount input values we can use random identifiers passed with ref
Mounts []*pb.Mount `protobuf:"bytes,2,rep,name=Mounts,proto3" json:"Mounts,omitempty"` {
Input int64 `protobuf:"varint,1,opt,name=input,proto3" json:"input,omitempty"`
Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
Dest string `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
Output int64 `protobuf:"varint,4,opt,name=output,proto3" json:"output,omitempty"`
Readonly bool `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
MountType MountType (bind=0,secret=1,ssh=2,cache=3,tmpfs=4) `protobuf:"varint,6,opt,name=mountType,proto3,enum=pb.MountType" json:"mountType,omitempty"`
TmpfsOpt *TmpfsOpt `protobuf:"bytes,19,opt,name=TmpfsOpt,proto3" json:"TmpfsOpt,omitempty"` {
Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
}
CacheOpt *CacheOpt `protobuf:"bytes,20,opt,name=cacheOpt,proto3" json:"cacheOpt,omitempty"` {
// ID is an optional namespace for the mount
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// Sharing is the sharing mode for the mount
Sharing CacheSharingOpt (shared=0,private=1,locked=2) `protobuf:"varint,2,opt,name=sharing,proto3,enum=pb.CacheSharingOpt" json:"sharing,omitempty"`
}
SecretOpt *SecretOpt `protobuf:"bytes,21,opt,name=secretOpt,proto3" json:"secretOpt,omitempty"` {
// ID of secret. Used for querying the value.
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// UID of secret file
Uid uint32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
// GID of secret file
Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"`
// Mode is the filesystem mode of secret file
Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
// Optional defines if secret value is required. Error is produced
// if value is not found and optional is false.
Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
}
SSHOpt *SSHOpt `protobuf:"bytes,22,opt,name=SSHOpt,proto3" json:"SSHOpt,omitempty"` {
// ID of exposed ssh rule. Used for querying the value.
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// UID of agent socket
Uid uint32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
// GID of agent socket
Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"`
// Mode is the filesystem mode of agent socket
Mode uint32 `protobuf:"varint,4,opt,name=mode,proto3" json:"mode,omitempty"`
// Optional defines if ssh socket is required. Error is produced
// if client does not expose ssh.
Optional bool `protobuf:"varint,5,opt,name=optional,proto3" json:"optional,omitempty"`
}
ResultID string `protobuf:"bytes,23,opt,name=resultID,proto3" json:"resultID,omitempty"`
ContentCache MountContentCache (default=0,on=1,off=2) `protobuf:"varint,24,opt,name=contentCache,proto3,enum=pb.MountContentCache" json:"contentCache,omitempty"`
}
Network pb.NetMode (unset=0,host=1,none=2) `protobuf:"varint,3,opt,name=Network,proto3,enum=pb.NetMode" json:"Network,omitempty"`
Platform *pb.Platform `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"` {
Architecture string `protobuf:"bytes,1,opt,name=Architecture,proto3" json:"Architecture,omitempty"`
OS string `protobuf:"bytes,2,opt,name=OS,proto3" json:"OS,omitempty"`
Variant string `protobuf:"bytes,3,opt,name=Variant,proto3" json:"Variant,omitempty"`
OSVersion string `protobuf:"bytes,4,opt,name=OSVersion,proto3" json:"OSVersion,omitempty"`
OSFeatures []string `protobuf:"bytes,5,rep,name=OSFeatures,proto3" json:"OSFeatures,omitempty"` // unused
}
Constraints *pb.WorkerConstraints `protobuf:"bytes,5,opt,name=constraints,proto3" json:"constraints,omitempty"` {
Filter []string `protobuf:"bytes,1,rep,name=filter,proto3" json:"filter,omitempty"` // containerd-style filter
}
ExtraHosts []*pb.HostIP `protobuf:"bytes,6,rep,name=extraHosts,proto3" json:"extraHosts,omitempty"` {
Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"`
IP string `protobuf:"bytes,2,opt,name=IP,proto3" json:"IP,omitempty"`
}
Hostname string `protobuf:"bytes,7,opt,name=hostname,proto3" json:"hostname,omitempty"`
```
### Response
(no fields)
## LLBBridge.Ping
### Request
(no fields)
### Response (PongResponse)
```go
FrontendAPICaps []*pb2.APICap `protobuf:"bytes,1,rep,name=FrontendAPICaps,proto3" json:"FrontendAPICaps,omitempty"` {
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Enabled bool `protobuf:"varint,2,opt,name=Enabled,proto3" json:"Enabled,omitempty"`
Deprecated bool `protobuf:"varint,3,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"` // Unused. May be used for warnings in the future
DisabledReason string `protobuf:"bytes,4,opt,name=DisabledReason,proto3" json:"DisabledReason,omitempty"` // Reason key for detection code
DisabledReasonMsg string `protobuf:"bytes,5,opt,name=DisabledReasonMsg,proto3" json:"DisabledReasonMsg,omitempty"` // Message to the user
DisabledAlternative string `protobuf:"bytes,6,opt,name=DisabledAlternative,proto3" json:"DisabledAlternative,omitempty"` // Identifier that updated client could catch.
}
LLBCaps []*pb2.APICap `protobuf:"bytes,2,rep,name=LLBCaps,proto3" json:"LLBCaps,omitempty"` {
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Enabled bool `protobuf:"varint,2,opt,name=Enabled,proto3" json:"Enabled,omitempty"`
Deprecated bool `protobuf:"varint,3,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"` // Unused. May be used for warnings in the future
DisabledReason string `protobuf:"bytes,4,opt,name=DisabledReason,proto3" json:"DisabledReason,omitempty"` // Reason key for detection code
DisabledReasonMsg string `protobuf:"bytes,5,opt,name=DisabledReasonMsg,proto3" json:"DisabledReasonMsg,omitempty"` // Message to the user
DisabledAlternative string `protobuf:"bytes,6,opt,name=DisabledAlternative,proto3" json:"DisabledAlternative,omitempty"` // Identifier that updated client could catch.
}
Workers []*types1.WorkerRecord `protobuf:"bytes,3,rep,name=Workers,proto3" json:"Workers,omitempty"` {
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
Labels map[string]string `protobuf:"bytes,2,rep,name=Labels,proto3" json:"Labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Platforms []*pb.Platform `protobuf:"bytes,3,rep,name=platforms,proto3" json:"platforms,omitempty"` {
Architecture string `protobuf:"bytes,1,opt,name=Architecture,proto3" json:"Architecture,omitempty"`
OS string `protobuf:"bytes,2,opt,name=OS,proto3" json:"OS,omitempty"`
Variant string `protobuf:"bytes,3,opt,name=Variant,proto3" json:"Variant,omitempty"`
OSVersion string `protobuf:"bytes,4,opt,name=OSVersion,proto3" json:"OSVersion,omitempty"`
OSFeatures []string `protobuf:"bytes,5,rep,name=OSFeatures,proto3" json:"OSFeatures,omitempty"` // unused
}
GCPolicy []*GCPolicy `protobuf:"bytes,4,rep,name=GCPolicy,proto3" json:"GCPolicy,omitempty"` {
All bool `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
KeepDuration int64 `protobuf:"varint,2,opt,name=keepDuration,proto3" json:"keepDuration,omitempty"`
Filters []string `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"`
// reservedSpace was renamed from freeBytes
ReservedSpace int64 `protobuf:"varint,3,opt,name=reservedSpace,proto3" json:"reservedSpace,omitempty"`
MaxUsedSpace int64 `protobuf:"varint,5,opt,name=maxUsedSpace,proto3" json:"maxUsedSpace,omitempty"`
MinFreeSpace int64 `protobuf:"varint,6,opt,name=minFreeSpace,proto3" json:"minFreeSpace,omitempty"`
}
BuildkitVersion *BuildkitVersion `protobuf:"bytes,5,opt,name=BuildkitVersion,proto3" json:"BuildkitVersion,omitempty"` {
Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"`
}
CDIDevices []*CDIDevice `protobuf:"bytes,6,rep,name=CDIDevices,proto3" json:"CDIDevices,omitempty"` {
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
AutoAllow bool `protobuf:"varint,2,opt,name=AutoAllow,proto3" json:"AutoAllow,omitempty"`
Annotations map[string]string `protobuf:"bytes,3,rep,name=Annotations,proto3" json:"Annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
OnDemand bool `protobuf:"varint,4,opt,name=OnDemand,proto3" json:"OnDemand,omitempty"`
}
}
```
## LLBBridge.ReadDir
### Request
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
DirPath string `protobuf:"bytes,2,opt,name=DirPath,proto3" json:"DirPath,omitempty"`
IncludePattern string `protobuf:"bytes,3,opt,name=IncludePattern,proto3" json:"IncludePattern,omitempty"`
```
### Response
```go
Entries []*types.Stat `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"`
Uid uint32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
Gid uint32 `protobuf:"varint,4,opt,name=gid,proto3" json:"gid,omitempty"`
Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
ModTime int64 `protobuf:"varint,6,opt,name=modTime,proto3" json:"modTime,omitempty"`
// int32 typeflag = 7;
Linkname string `protobuf:"bytes,7,opt,name=linkname,proto3" json:"linkname,omitempty"`
Devmajor int64 `protobuf:"varint,8,opt,name=devmajor,proto3" json:"devmajor,omitempty"`
Devminor int64 `protobuf:"varint,9,opt,name=devminor,proto3" json:"devminor,omitempty"`
Xattrs map[string][]byte `protobuf:"bytes,10,rep,name=xattrs,proto3" json:"xattrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
```
## LLBBridge.ReadFile
### Request
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
FilePath string `protobuf:"bytes,2,opt,name=FilePath,proto3" json:"FilePath,omitempty"`
Range *FileRange `protobuf:"bytes,3,opt,name=Range,proto3" json:"Range,omitempty"` {
Offset int64 `protobuf:"varint,1,opt,name=Offset,proto3" json:"Offset,omitempty"`
Length int64 `protobuf:"varint,2,opt,name=Length,proto3" json:"Length,omitempty"`
}
```
### Response
```go
Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"`
```
## LLBBridge.ReleaseContainer
### Request
```go
ContainerID string `protobuf:"bytes,1,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"`
```
### Response
(no fields)
## LLBBridge.ResolveImageConfig
### Request
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
Platform *pb.Platform `protobuf:"bytes,2,opt,name=Platform,proto3" json:"Platform,omitempty"`` {
Architecture string `protobuf:"bytes,1,opt,name=Architecture,proto3" json:"Architecture,omitempty"`
OS string `protobuf:"bytes,2,opt,name=OS,proto3" json:"OS,omitempty"`
Variant string `protobuf:"bytes,3,opt,name=Variant,proto3" json:"Variant,omitempty"`
OSVersion string `protobuf:"bytes,4,opt,name=OSVersion,proto3" json:"OSVersion,omitempty"`
OSFeatures []string `protobuf:"bytes,5,rep,name=OSFeatures,proto3" json:"OSFeatures,omitempty"` // unused
}
ResolveMode string `protobuf:"bytes,3,opt,name=ResolveMode,proto3" json:"ResolveMode,omitempty"`
LogName string `protobuf:"bytes,4,opt,name=LogName,proto3" json:"LogName,omitempty"`
ResolverType int32 `protobuf:"varint,5,opt,name=ResolverType,proto3" json:"ResolverType,omitempty"`
SessionID string `protobuf:"bytes,6,opt,name=SessionID,proto3" json:"SessionID,omitempty"`
StoreID string `protobuf:"bytes,7,opt,name=StoreID,proto3" json:"StoreID,omitempty"`
SourcePolicies []*pb1.Policy `protobuf:"bytes,8,rep,name=SourcePolicies,proto3" json:"SourcePolicies,omitempty"` {
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // Currently 1
Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` {
Action PolicyAction (allow=0,deny=1,convert=2) `protobuf:"varint,1,opt,name=action,proto3,enum=moby.buildkit.v1.sourcepolicy.PolicyAction" json:"action,omitempty"`
Selector *Selector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// MatchType is the type of match to perform on the source identifier
MatchType MatchType (wildcard=0,exact=1,regex=2) `protobuf:"varint,2,opt,name=match_type,json=matchType,proto3,enum=moby.buildkit.v1.sourcepolicy.MatchType" json:"match_type,omitempty"`
Constraints []*AttrConstraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"` {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Condition AttrMatch (equal=0,notequal=1,matches=2) `protobuf:"varint,3,opt,name=condition,proto3,enum=moby.buildkit.v1.sourcepolicy.AttrMatch" json:"condition,omitempty"`
}
}
Updates *Update `protobuf:"bytes,3,opt,name=updates,proto3" json:"updates,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
}
}
```
### Response
```go
Digest string `protobuf:"bytes,1,opt,name=Digest,proto3" json:"Digest,omitempty"`
Config []byte `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"`
Ref string `protobuf:"bytes,3,opt,name=Ref,proto3" json:"Ref,omitempty"`
```
## LLBBridge.ResolveSourceMeta
### Request
```go
Source *pb.SourceOp `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` {
// TODO: use source type or any type instead of URL protocol.
// identifier e.g. local://, docker-image://, git://, https://...
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// attrs are defined in attr.go
Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
Platform *pb.Platform `protobuf:"bytes,2,opt,name=Platform,proto3" json:"Platform,omitempty"` {
Architecture string `protobuf:"bytes,1,opt,name=Architecture,proto3" json:"Architecture,omitempty"`
OS string `protobuf:"bytes,2,opt,name=OS,proto3" json:"OS,omitempty"`
Variant string `protobuf:"bytes,3,opt,name=Variant,proto3" json:"Variant,omitempty"`
OSVersion string `protobuf:"bytes,4,opt,name=OSVersion,proto3" json:"OSVersion,omitempty"`
OSFeatures []string `protobuf:"bytes,5,rep,name=OSFeatures,proto3" json:"OSFeatures,omitempty"` // unused
}
LogName string `protobuf:"bytes,3,opt,name=LogName,proto3" json:"LogName,omitempty"`
ResolveMode string `protobuf:"bytes,4,opt,name=ResolveMode,proto3" json:"ResolveMode,omitempty"`
SourcePolicies []*pb1.Policy `protobuf:"bytes,8,rep,name=SourcePolicies,proto3" json:"SourcePolicies,omitempty"` {
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // Currently 1
Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` {
Action PolicyAction (allow=0,deny=1,convert=2) `protobuf:"varint,1,opt,name=action,proto3,enum=moby.buildkit.v1.sourcepolicy.PolicyAction" json:"action,omitempty"`
Selector *Selector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// MatchType is the type of match to perform on the source identifier
MatchType MatchType (wildcard=0,exact=1,regex=2) `protobuf:"varint,2,opt,name=match_type,json=matchType,proto3,enum=moby.buildkit.v1.sourcepolicy.MatchType" json:"match_type,omitempty"`
Constraints []*AttrConstraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"` {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Condition AttrMatch (equal=0,notequal=1,matches=2) `protobuf:"varint,3,opt,name=condition,proto3,enum=moby.buildkit.v1.sourcepolicy.AttrMatch" json:"condition,omitempty"`
}
}
Updates *Update `protobuf:"bytes,3,opt,name=updates,proto3" json:"updates,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
}
}
```
### Response
```go
Source *pb.SourceOp `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` {
// TODO: use source type or any type instead of URL protocol.
// identifier e.g. local://, docker-image://, git://, https://...
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// attrs are defined in attr.go
Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
Image *ResolveSourceImageResponse `protobuf:"bytes,2,opt,name=Image,proto3" json:"Image,omitempty"` {
Digest string `protobuf:"bytes,1,opt,name=Digest,proto3" json:"Digest,omitempty"`
Config []byte `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"`
}
```
## LLBBridge.Return
### Request
```go
Result *Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` {
// Types that are valid to be assigned to Result:
//
// *Result_RefDeprecated
// *Result_RefsDeprecated
// *Result_Ref {
// Ref *Ref `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` {
// Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Def *pb.Definition `protobuf:"bytes,2,opt,name=def,proto3" json:"def,omitempty"`
// }
// }
// *Result_Refs {
// Refs *RefMap `protobuf:"bytes,4,opt,name=refs,proto3,oneof"` {
// Refs map[string]*Ref `protobuf:"bytes,1,rep,name=refs,proto3" json:"refs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
// Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Def *pb.Definition `protobuf:"bytes,2,opt,name=def,proto3" json:"def,omitempty"`
// }
// }
// }
Result isResult_Result `protobuf_oneof:"result"`
Metadata map[string][]byte `protobuf:"bytes,10,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// 11 was used during development and is reserved for old attestation format
Attestations map[string]*Attestations `protobuf:"bytes,12,rep,name=attestations,proto3" json:"attestations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
Attestation []*Attestation {
Kind AttestationKind (intoto=0,bundle=1) `protobuf:"varint,1,opt,name=kind,proto3,enum=moby.buildkit.v1.frontend.AttestationKind"
json:"kind,omitempty"`
Metadata map[string][]byte `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Ref *Ref `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Def *pb.Definition `protobuf:"bytes,2,opt,name=def,proto3" json:"def,omitempty"`
}
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
InTotoPredicateType string `protobuf:"bytes,5,opt,name=inTotoPredicateType,proto3" json:"inTotoPredicateType,omitempty"`
InTotoSubjects []*InTotoSubject `protobuf:"bytes,6,rep,name=inTotoSubjects,proto3" json:"inTotoSubjects,omitempty"` {
Kind InTotoSubjectKind (self=0,raw=1) `protobuf:"varint,1,opt,name=kind,proto3,enum=moby.buildkit.v1.frontend.InTotoSubjectKind" json:"kind,omitempty"`
Digest []string `protobuf:"bytes,2,rep,name=digest,proto3" json:"digest,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}
}
}
}
Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` {
// The status code, which should be an enum value of
// [google.rpc.Code][google.rpc.Code].
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized
// by the client.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// A list of messages that carry the error details. There is a common set of
// message types for APIs to use.
Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"`
}
```
### Response
(no fields)
## LLBBridge.Solve
### Request
Note that the `Definition` field is not inlined, and that a front end calling this API may be invoking another frontend.
```go
Definition *pb.Definition `protobuf:"bytes,1,opt,name=Definition,proto3" json:"Definition,omitempty"`
Frontend string `protobuf:"bytes,2,opt,name=Frontend,proto3" json:"Frontend,omitempty"`
FrontendOpt map[string]string `protobuf:"bytes,3,rep,name=FrontendOpt,proto3" json:"FrontendOpt,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// 4 was removed in BuildKit v0.11.0.
AllowResultReturn bool `protobuf:"varint,5,opt,name=allowResultReturn,proto3" json:"allowResultReturn,omitempty"`
AllowResultArrayRef bool `protobuf:"varint,6,opt,name=allowResultArrayRef,proto3" json:"allowResultArrayRef,omitempty"`
// apicaps.CapSolveInlineReturn deprecated
Final bool `protobuf:"varint,10,opt,name=Final,proto3" json:"Final,omitempty"`
ExporterAttr []byte `protobuf:"bytes,11,opt,name=ExporterAttr,proto3" json:"ExporterAttr,omitempty"`
// CacheImports was added in BuildKit v0.4.0.
// apicaps:CapImportCaches
CacheImports []*CacheOptionsEntry `protobuf:"bytes,12,rep,name=CacheImports,proto3" json:"CacheImports,omitempty"` {
Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
// apicaps:CapFrontendInputs
FrontendInputs map[string]*pb.Definition `protobuf:"bytes,13,rep,name=FrontendInputs,proto3" json:"FrontendInputs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Evaluate bool `protobuf:"varint,14,opt,name=Evaluate,proto3" json:"Evaluate,omitempty"`
SourcePolicies []*pb1.Policy `protobuf:"bytes,15,rep,name=SourcePolicies,proto3" json:"SourcePolicies,omitempty"` {
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // Currently 1
Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` {
Action PolicyAction (allow=0,deny=1,convert=2) `protobuf:"varint,1,opt,name=action,proto3,enum=moby.buildkit.v1.sourcepolicy.PolicyAction" json:"action,omitempty"`
Selector *Selector `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
// MatchType is the type of match to perform on the source identifier
MatchType MatchType (wildcard=0,exact=1,regex=2) `protobuf:"varint,2,opt,name=match_type,json=matchType,proto3,enum=moby.buildkit.v1.sourcepolicy.MatchType" json:"match_type,omitempty"`
Constraints []*AttrConstraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"` {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Condition AttrMatch (equal=0,notequal=1,matches=2) `protobuf:"varint,3,opt,name=condition,proto3,enum=moby.buildkit.v1.sourcepolicy.AttrMatch" json:"condition,omitempty"`
}
}
Updates *Update `protobuf:"bytes,3,opt,name=updates,proto3" json:"updates,omitempty"` {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
Attrs map[string]string `protobuf:"bytes,2,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
}
}
```
### Response
```go
// deprecated
Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` // can be used by readfile request
// these fields are returned when allowMapReturn was set
Result *Result `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` {
// Types that are valid to be assigned to Result:
//
// *Result_RefDeprecated
// *Result_RefsDeprecated
// *Result_Ref {
// Ref *Ref `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` {
// Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Def *pb.Definition `protobuf:"bytes,2,opt,name=def,proto3" json:"def,omitempty"`
// }
// }
// *Result_Refs {
// Refs *RefMap `protobuf:"bytes,4,opt,name=refs,proto3,oneof"` {
// Refs map[string]*Ref `protobuf:"bytes,1,rep,name=refs,proto3" json:"refs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
// Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Def *pb.Definition `protobuf:"bytes,2,opt,name=def,proto3" json:"def,omitempty"`
// }
// }
// }
Result isResult_Result `protobuf_oneof:"result"`
Metadata map[string][]byte `protobuf:"bytes,10,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// 11 was used during development and is reserved for old attestation format
Attestations map[string]*Attestations `protobuf:"bytes,12,rep,name=attestations,proto3" json:"attestations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` {
Attestation []*Attestation {
Kind AttestationKind (intoto=0,bundle=1) `protobuf:"varint,1,opt,name=kind,proto3,enum=moby.buildkit.v1.frontend.AttestationKind"
json:"kind,omitempty"`
Metadata map[string][]byte `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Ref *Ref `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Def *pb.Definition `protobuf:"bytes,2,opt,name=def,proto3" json:"def,omitempty"`
}
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
InTotoPredicateType string `protobuf:"bytes,5,opt,name=inTotoPredicateType,proto3" json:"inTotoPredicateType,omitempty"`
InTotoSubjects []*InTotoSubject `protobuf:"bytes,6,rep,name=inTotoSubjects,proto3" json:"inTotoSubjects,omitempty"` {
Kind InTotoSubjectKind (self=0,raw=1) `protobuf:"varint,1,opt,name=kind,proto3,enum=moby.buildkit.v1.frontend.InTotoSubjectKind" json:"kind,omitempty"`
Digest []string `protobuf:"bytes,2,rep,name=digest,proto3" json:"digest,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}
}
}
}
```
## LLBBridge.StatFile
### `copier.Stat()` doesn’t return device major/minor, nor xattrs. We’ll need to extend it.
### Request
```go
Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"`
Path string `protobuf:"bytes,2,opt,name=Path,proto3" json:"Path,omitempty"`
```
### Response
```go
Stat *types.Stat `protobuf:"bytes,1,opt,name=stat,proto3" json:"stat,omitempty"` {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"`
Uid uint32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
Gid uint32 `protobuf:"varint,4,opt,name=gid,proto3" json:"gid,omitempty"`
Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
ModTime int64 `protobuf:"varint,6,opt,name=modTime,proto3" json:"modTime,omitempty"`
// int32 typeflag = 7;
Linkname string `protobuf:"bytes,7,opt,name=linkname,proto3" json:"linkname,omitempty"`
Devmajor int64 `protobuf:"varint,8,opt,name=devmajor,proto3" json:"devmajor,omitempty"`
Devminor int64 `protobuf:"varint,9,opt,name=devminor,proto3" json:"devminor,omitempty"`
Xattrs map[string][]byte `protobuf:"bytes,10,rep,name=xattrs,proto3" json:"xattrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
```
## LLBBridge.Warn
### Request
```go
Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
Level int64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"`
Short []byte `protobuf:"bytes,3,opt,name=short,proto3" json:"short,omitempty"`
Detail [][]byte `protobuf:"bytes,4,rep,name=detail,proto3" json:"detail,omitempty"`
Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
Info *pb.SourceInfo `protobuf:"bytes,6,opt,name=info,proto3" json:"info,omitempty"` {
Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Definition *Definition `protobuf:"bytes,3,opt,name=definition,proto3" json:"definition,omitempty"`
Language string `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"`
}
Ranges []*pb.Range `protobuf:"bytes,7,rep,name=ranges,proto3" json:"ranges,omitempty"` {
Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` {
Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
Character int32 `protobuf:"varint,2,opt,name=character,proto3" json:"character,omitempty"`
}
End *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` {
Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
Character int32 `protobuf:"varint,2,opt,name=character,proto3" json:"character,omitempty"`
}
}
```
### Response
(no fields)