diff --git a/cmd/tipgodoc/Dockerfile b/cmd/tipgodoc/Dockerfile index 23060d3813..ac958192df 100644 --- a/cmd/tipgodoc/Dockerfile +++ b/cmd/tipgodoc/Dockerfile @@ -1,7 +1,10 @@ -FROM golang +FROM golang:1.4.1 RUN apt-get update && apt-get install --no-install-recommends -y -q build-essential git +# golang puts its go install here (weird but true) +ENV GOROOT_BOOTSTRAP /usr/src/go + # golang sets GOPATH=/go ADD . /go/src/tipgodoc RUN go install tipgodoc diff --git a/cmd/tipgodoc/tip.go b/cmd/tipgodoc/tip.go index 6fc0656be5..4a92a5c13f 100644 --- a/cmd/tipgodoc/tip.go +++ b/cmd/tipgodoc/tip.go @@ -151,7 +151,11 @@ func initSide(side, goHash, toolsHash string) (godoc *exec.Cmd, hostport string, } goBin := filepath.Join(goDir, "bin/go") install := exec.Command(goBin, "install", "golang.org/x/tools/cmd/godoc") - install.Env = []string{"GOROOT=" + goDir, "GOPATH=" + filepath.Join(dir, "gopath")} + install.Env = []string{ + "GOROOT=" + goDir, + "GOPATH=" + filepath.Join(dir, "gopath"), + "GOROOT_BOOTSTRAP=" + os.Getenv("GOROOT_BOOTSTRAP"), + } if err := runErr(install); err != nil { return nil, "", err }