File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- rootfs /opt /registry / sbin / registry
1+ rootfs /opt /
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ REPO_PATH = github.com/deis/registry
1313# and other build options
1414DEV_ENV_IMAGE := quay.io/deis/go-dev:0.10.0
1515DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
16- DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
16+ DEV_ENV_PREFIX := docker run --rm -e GO15VENDOREXPERIMENT=1 -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
17+ DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
1718LDFLAGS := "-s -X main.version=${VERSION}"
1819BINDIR := ./rootfs/opt/registry/sbin
1920
3435
3536build : check-docker
3637 mkdir -p ${BINDIR}
37- ${DEV_ENV_CMD} make build-binary
38+ $( MAKE ) build-binary
3839
3940# For cases where we're building from local
4041# We also alter the RC file to set the image name.
@@ -47,7 +48,9 @@ docker-push: check-docker check-registry
4748 docker push ${IMAGE}
4849
4950build-binary :
50- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags ${LDFLAGS} -o $(BINDIR ) /${SHORT_NAME} main.go
51+ ${DEV_ENV_PREFIX} -e CGO_ENABLED=0 ${DEV_ENV_IMAGE} go build -a -installsuffix cgo -ldflags ${LDFLAGS} -o $(BINDIR ) /${SHORT_NAME} main.go
52+ $(call check-static-binary,$(BINDIR ) /${SHORT_NAME})
53+ ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE} goupx --strip-binary -9 --brute $(BINDIR ) /${SHORT_NAME}
5154
5255# Deploy is a Kubernetes-oriented target
5356deploy : kube-secret kube-service kube-rc
You can’t perform that action at this time.
0 commit comments