Skip to content

Commit

Permalink
Merge pull request #7703 from petermattis/pmattis/really-fix-build-bu…
Browse files Browse the repository at this point in the history
…ilder

build: really use different go pkg directories for docker builds
  • Loading branch information
petermattis authored Jul 8, 2016
2 parents e56c9c4 + e4e607c commit 97f4679
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions build/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 97f4679

Please sign in to comment.