Skip to content

Commit

Permalink
Speed up rebuilds from within build container by bind mounting $GOPAT…
Browse files Browse the repository at this point in the history
…H/pkg:/root/go/pkg
  • Loading branch information
jessesuen committed Oct 26, 2017
1 parent 7144567 commit ac58d83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
GOARCH = amd64
GOARCH=amd64
GOPATH=$(shell go env GOPATH)

PACKAGE=github.com/argoproj/argo
BUILD_DIR=${GOPATH}/src/${PACKAGE}
Expand All @@ -15,7 +16,7 @@ LDFLAGS = -ldflags "-X ${PACKAGE}.Version=${VERSION} -X ${PACKAGE}.Revision=${RE
BUILDER_IMAGE=argo-builder
BUILDER_CMD=docker run --rm \
-v ${BUILD_DIR}:/root/go/src/${PACKAGE} \
-v ${BUILD_DIR}/dist/cache:/root/go/pkg \
-v ${GOPATH}/pkg:/root/go/pkg \
-w /root/go/src/${PACKAGE} ${BUILDER_IMAGE}

# docker image publishing options
Expand Down

0 comments on commit ac58d83

Please sign in to comment.