Repository navigation
Make env in ImageConfig a map - #1505
Conversation
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 <[email protected]>
|
Thanks @helderco -- this is great! Just to state the obvious, the downside is we have to maintain our own copy of I personally think this is an acceptable tradeoff -- the OCI spec is stable and not changing constantly. /cc @shykes @jlongtine |
| label?: [string]: string | ||
| healthcheck?: #HealthCheck | ||
| shell?: [...string] | ||
| ... |
There was a problem hiding this comment.
I don't think ... is necessary any longer
There was a problem hiding this comment.
I kept it because I haven't added all fields to CUE (here). This is meant to serve as documentation for users.
For example, argsescaped is added with a true value if you use the shell form in a Dockerfile's CMD or ENTRYPOINT. The spec documents this: "True if command is already escaped (Windows specific)".
Although, since the fields were renamed, you'd have to look into the Go code to check on those that aren't included here, so there's an argument for adding all fields here as well. I can push an update for this.
shykes
left a comment
There was a problem hiding this comment.
LGTM thanks @helderco for the great contribution!
I agree that the tradeoff is worth it. We can always add utility CUE definitions if someone wants to convert back and forth between the raw OCI schema and our developer-friendly format.
Signed-off-by: Joel Longtine <[email protected]>
Closes #1437.
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 PR is focused on env.