diff --git a/build/builder.sh b/build/builder.sh index 1a6430037793..330b8dd90a86 100755 --- a/build/builder.sh +++ b/build/builder.sh @@ -66,21 +66,22 @@ cockroach_toplevel="$(dirname $(cd $(dirname $0); pwd))" # This script supports both circleci and development hosts, so it must # support cases where the architecture inside the container is # different from that outside the container. We map /src/ directly -# into the container because it is architecture-independent, and /pkg/ -# because every subdirectory is tagged with its architecture. We also -# map certain subdirectories of ${GOPATH}/pkg into ${GOROOT}/pkg so -# they can be used to cache builds of the standard library. /bin/ is -# mapped separately to avoid clobbering the host's binaries. Note that -# the path used for the /bin/ mapping is also used in the defaultBinary +# into the container because it is architecture-independent. We then +# map certain subdirectories of ${GOPATH}/pkg into both ${GOPATH}/pkg +# and ${GOROOT}/pkg. The ${GOROOT} mapping is needed so they can be +# used to cache builds of the standard library. /bin/ is mapped +# separately to avoid clobbering the host's binaries. Note that the +# path used for the /bin/ mapping is also used in the defaultBinary # function of localcluster.go. # # -i causes some commands (including `git diff`) to attempt to use # a pager, so we override $PAGER to disable. docker run -i ${tty-} ${rm} \ --volume="${gopath0}/src:/go/src" \ - --volume="${gopath0}/pkg:/go/pkg" \ - --volume="${gopath0}/pkg/docker_amd64:/usr/src/go/pkg/linux_amd64" \ - --volume="${gopath0}/pkg/docker_amd64_race:/usr/src/go/pkg/linux_amd64_race" \ + --volume="${gopath0}/pkg/docker_amd64:/go/pkg/linux_amd64" \ + --volume="${gopath0}/pkg/docker_amd64_race:/go/pkg/linux_amd64_race" \ + --volume="${gopath0}/pkg/docker_amd64:/usr/local/go/pkg/linux_amd64" \ + --volume="${gopath0}/pkg/docker_amd64_race:/usr/local/go/pkg/linux_amd64_race" \ --volume="${gopath0}/bin/docker_amd64:/go/bin" \ --volume="${HOME}/.jspm:/root/.jspm" \ --volume="${HOME}/.npm:/root/.npm" \