Skip to content
This repository was archived by the owner on Dec 1, 2018. It is now read-only.

Commit 47abb81

Browse files
authored
Merge pull request #1509 from krzyzacy/experiment
Couple more changes for mount docker-in-docker volume
2 parents 91d5dfd + 94ab41b commit 47abb81

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ ARCH?=amd64
66
ALL_ARCHITECTURES=amd64 arm arm64 ppc64le s390x
77
ML_PLATFORMS=linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x
88
GOLANG_VERSION?=1.7
9+
10+
ifndef TEMP_DIR
911
TEMP_DIR:=$(shell mktemp -d /tmp/heapster.XXXXXX)
12+
endif
1013

1114
VERSION?=v1.3.0-beta.1
1215
GIT_COMMIT:=$(shell git rev-parse --short HEAD)
13-
REPO_DIR?=$(shell pwd)
16+
17+
ifdef REPO_DIR
18+
DOCKER_IN_DOCKER=1
19+
else
20+
REPO_DIR:=$(shell pwd)
21+
endif
1422

1523
# You can set this variable for testing and the built image will also be tagged with this name
1624
OVERRIDE_IMAGE_NAME?=
@@ -81,7 +89,10 @@ container:
8189
ifneq ($(OVERRIDE_IMAGE_NAME),)
8290
docker tag -f $(PREFIX)/heapster-$(ARCH):$(VERSION) $(OVERRIDE_IMAGE_NAME)
8391
endif
92+
93+
ifndef DOCKER_IN_DOCKER
8494
rm -rf $(TEMP_DIR)
95+
endif
8596

8697
do-push:
8798
docker push $(PREFIX)/heapster-$(ARCH):$(VERSION)

0 commit comments

Comments
 (0)