From 56dab104ca9a34883c07c2b4c5aaeb101da26b68 Mon Sep 17 00:00:00 2001 From: Sam Alba Date: Mon, 13 Dec 2021 16:09:38 -0800 Subject: [PATCH] stdlib/os/container: added ability to mount sockets (dagger.#Stream) Signed-off-by: Sam Alba --- stdlib/os/container.cue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stdlib/os/container.cue b/stdlib/os/container.cue index 20f57fe6..16d0b914 100644 --- a/stdlib/os/container.cue +++ b/stdlib/os/container.cue @@ -54,6 +54,9 @@ import ( // Safely mount secrets (in cleartext) as non-persistent files secret: [string]: dagger.#Secret + // Mount unix socket or windows npipes to the corresponding path + socket: [string]: dagger.#Stream + // Write file in the container files: [string]: { content: string @@ -120,6 +123,9 @@ import ( for dest, _ in tmpfs { "\(dest)": "tmpfs" } + for dest, s in socket { + "\(dest)": stream: s + } } } },