From 4318aeb32379edca97ba9c887d0fdfbef1539066 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Thu, 8 Apr 2021 01:00:13 +0000 Subject: [PATCH] stdlib: docker: option "export" field Signed-off-by: Solomon Hykes --- stdlib/docker/container.cue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stdlib/docker/container.cue b/stdlib/docker/container.cue index cdf3c528..1b7322b4 100644 --- a/stdlib/docker/container.cue +++ b/stdlib/docker/container.cue @@ -86,6 +86,12 @@ import ( } env: PATH: string | *strings.Join([ for p, v in shell.search if v {p}], ":") + // Export values from the container to the cue configuration + export: *null | { + source: string + format: op.#Export.format + } + #up: [ op.#Load & {from: image}, // Copy volumes with type=copy @@ -122,5 +128,11 @@ import ( op.#Subdir & { dir: outputDir }, + if export != null { + op.#Export & { + source: export.source + format: export.format + } + }, ] }