Make env in ImageConfig a map

Fields in CUE were renamed to the lowercase version of Dockerfile instructions.

There's now opportunity to make other fields simpler to use (e.g., healthcheck), this commit is focused on env.

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
Helder Correia
2022-01-26 09:22:09 -01:00
parent c6d4ffb75e
commit c276a8b8ba
9 changed files with 184 additions and 19 deletions

View File

@@ -35,15 +35,28 @@ package engine
// Container image config. See [OCI](https://www.opencontainers.org/).
// Spec left open on purpose to account for additional fields.
// [Image Spec](https://github.com/opencontainers/image-spec/blob/main/specs-go/v1/config.go)
// [Docker Superset](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/dockerfile2llb/image.go)
#ImageConfig: {
Env?: [...string]
User?: string
Cmd?: [...string]
user?: string
expose?: [string]: {}
env?: [string]: string
entrypoint?: [...string]
cmd?: [...string]
volume?: [string]: {}
workdir?: string
label?: [string]: string
healthcheck?: #HealthCheck
shell?: [...string]
...
}
#HealthCheck: {
test?: [...string]
interval?: int
timeout?: int
startPeriod?: int
retries?: int
}
// Download a container image from a remote repository
#Pull: {
$dagger: task: _name: "Pull"