From 8fadaf419ecea41c77040872c81985c5f343e551 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 19 Feb 2021 14:35:01 -0800 Subject: [PATCH] stdlib: go: mount source rather than copying Signed-off-by: Andrea Luzzardi --- stdlib/go/go.cue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/stdlib/go/go.cue b/stdlib/go/go.cue index 75adb256..416c7ee0 100644 --- a/stdlib/go/go.cue +++ b/stdlib/go/go.cue @@ -21,12 +21,7 @@ import ( dagger.#FetchContainer & { ref: "docker.io/golang:\(version)-alpine" }, - dagger.#Copy & { - from: source - dest: "/src" - }, dagger.#Exec & { - dir: "/src" "args": ["go"] + args env: env @@ -38,6 +33,9 @@ import ( GOPATH: "/go" } + dir: "/src" + mount: "/src": from: source + mount: "/root/.cache": "cache" }, ]