stdlib: go: mount source rather than copying

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-02-19 14:35:01 -08:00
parent 3748bbc7db
commit 8fadaf419e

View File

@ -21,12 +21,7 @@ import (
dagger.#FetchContainer & { dagger.#FetchContainer & {
ref: "docker.io/golang:\(version)-alpine" ref: "docker.io/golang:\(version)-alpine"
}, },
dagger.#Copy & {
from: source
dest: "/src"
},
dagger.#Exec & { dagger.#Exec & {
dir: "/src"
"args": ["go"] + args "args": ["go"] + args
env: env env: env
@ -38,6 +33,9 @@ import (
GOPATH: "/go" GOPATH: "/go"
} }
dir: "/src"
mount: "/src": from: source
mount: "/root/.cache": "cache" mount: "/root/.cache": "cache"
}, },
] ]