Daemon: builds
cua.daemon.v1 builds: the messages of SpaceService.BuildSpace, ListBuilds and DeleteBuild.
Building an image from a Dockerfile or steps into pinned checkpoints, its progress, result and listing.
Source: libs/cua/proto/cua/daemon/v1/builds.proto.
Types in cua/daemon/v1/builds.proto#
BuildSpaceRequest#
Request for SpaceService.BuildSpace: give a Dockerfile, or a base and
steps.
| Field | # | Type | Description |
|---|---|---|---|
dockerfile | 1 | string | Dockerfile text. |
context_dir | 2 | string | The build context: the directory COPY sources are relative to, on the daemon's machine. |
base | 3 | string | The base image for a build of steps alone. |
steps_json | 4 | string | JSON array of build steps ({"op":"run","command":"make"}, copy, env, workdir, user, ...), after the Dockerfile's. |
build_args | 5 | map of string to string | Build arguments (ARG values). |
tag | 6 | string | Alias for the result. |
kind | 7 | string | "vm" (default, empty), "container" or "microvm". |
location | 8 | string | Where: "local" (default, empty). A build's checkpoints stay on the machine that took them. |
cpus | 9 | uint32 | vCPUs of the machine (0: 2). |
memory_mb | 10 | uint64 | Memory in MiB (0: 4096). |
headless | 11 | optional bool | No desktop (unset: true). |
no_cache | 12 | bool | Build every layer again. |
step_timeout | 13 | google.protobuf.Duration | Budget for each step (default 1 hour). |
BuildProgress#
What a build is doing.
| Field | # | Type | Description |
|---|---|---|---|
event | 1 | string | "note", "step", "output", "step_done" or "finished". |
index | 2 | uint32 | The step (0: the base image). |
total | 3 | uint32 | Steps after the base. |
text | 4 | string | The step as a line, a note, or an output line. |
cached | 5 | bool | "step": served from a cached layer. "finished": nothing ran. |
seconds | 6 | double | "step_done" and "finished": seconds taken. |
checkpoint | 7 | string | "step_done": the layer's checkpoint. |
BuildStepResult#
One step of a finished build.
| Field | # | Type | Description |
|---|---|---|---|
index | 1 | uint32 | The step (0: the base image). |
text | 2 | string | The step as a line. |
cached | 3 | bool | Served from a cached layer. |
seconds | 4 | double | Seconds taken (0 when cached). |
checkpoint | 5 | string | The layer's checkpoint, for a step that makes one. |
BuildResult#
A finished build.
| Field | # | Type | Description |
|---|---|---|---|
checkpoint | 1 | string | The final layer's checkpoint (a fork source). |
tag | 2 | string | The tag, when asked for. |
key | 3 | string | The recipe's cache key. |
cached | 4 | bool | Every layer was cached. |
steps | 5 | repeated BuildStepResult | One per step, base first. |
config_json | 6 | string | JSON image configuration (env, workdir, user, cmd, ...). |
seconds | 7 | double | Seconds the build took. |
BuildSpaceResponse#
One message of SpaceService.BuildSpace.
| Field | # | Type | Description |
|---|---|---|---|
progress | 1 | BuildProgress (oneof event) | What the build is doing now. |
result | 2 | BuildResult (oneof event) | The result (the last message). |
ListBuildsRequest#
Request for SpaceService.ListBuilds.
No fields.
BuildInfo#
A build on this machine.
| Field | # | Type | Description |
|---|---|---|---|
checkpoint | 1 | string | The final layer's checkpoint. |
key | 2 | string | The recipe's cache key. |
tags | 3 | repeated string | Tags naming it. |
base | 4 | string | The FROM reference. |
layers | 5 | repeated string | Layers it is made of (checkpoints), base first. |
created_at | 6 | string | RFC 3339 build time. |
config_json | 7 | string | JSON image configuration. |
ListBuildsResponse#
Response for SpaceService.ListBuilds.
| Field | # | Type | Description |
|---|---|---|---|
builds | 1 | repeated BuildInfo | Builds, oldest first. |
DeleteBuildRequest#
Request for SpaceService.DeleteBuild.
| Field | # | Type | Description |
|---|---|---|---|
build | 1 | string | A tag, a recipe key (or its first 12 characters) or a checkpoint. |
DeleteBuildResponse#
Response for SpaceService.DeleteBuild.
| Field | # | Type | Description |
|---|---|---|---|
deleted | 1 | repeated string | The layer checkpoints deleted. |