Commit 25c51c2 1 parent cab1133 commit 25c51c2 Copy full SHA for 25c51c2
File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed 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
13
13
# and other build options
14
14
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.10.0
15
15
DEV_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}
17
18
LDFLAGS := "-s -X main.version=${VERSION}"
18
19
BINDIR := ./rootfs/opt/registry/sbin
19
20
34
35
35
36
build : check-docker
36
37
mkdir -p ${BINDIR}
37
- ${DEV_ENV_CMD} make build-binary
38
+ $( MAKE ) build-binary
38
39
39
40
# For cases where we're building from local
40
41
# We also alter the RC file to set the image name.
@@ -47,7 +48,9 @@ docker-push: check-docker check-registry
47
48
docker push ${IMAGE}
48
49
49
50
build-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}
51
54
52
55
# Deploy is a Kubernetes-oriented target
53
56
deploy : kube-secret kube-service kube-rc
You can’t perform that action at this time.
0 commit comments