From 4bac21784749a446e5f71a022ce303f59c2908b4 Mon Sep 17 00:00:00 2001 From: James Jeffrey Date: Fri, 7 Jul 2017 10:00:18 -0700 Subject: [PATCH] Detect vendor dir by having the func be on the go path --- fn/langs/go.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fn/langs/go.go b/fn/langs/go.go index 2f1d07074..b9d438ccd 100644 --- a/fn/langs/go.go +++ b/fn/langs/go.go @@ -18,20 +18,20 @@ func (h *GoLangHelper) DockerfileBuildCmds() []string { // For now we assume that dependencies are vendored already, but we could vendor them // inside the container. Maybe we should check for /vendor dir and if it doesn't exist, // either run `dep init` if no Gopkg.toml/lock found or `dep ensure` if it's there. - r = append(r, "ADD . /src") + r = append(r, "ADD . /go/src/func/") // if exists("Gopkg.toml") { // r = append(r, // "RUN go get -u github.com/golang/dep/cmd/dep", // "RUN cd /src && dep ensure", // ) // } - r = append(r, "RUN cd /src && go build -o func") + r = append(r, "RUN cd /go/src/func/ && go build -o func") return r } func (h *GoLangHelper) DockerfileCopyCmds() []string { return []string{ - "COPY --from=build-stage /src/func /function/", + "COPY --from=build-stage /go/src/func/ /function/", } }