Make docker-in-docker DOCKER_CONFIG configurable
@@ -35,6 +35,8 @@ PWD := $$(pwd)
# Whether to build inside a containerized build environment
DOCKER_BUILD ?= "true"
+DOCKER_CONFIG ?= "$(HOME)/.docker"
+
###
### These variables should not need tweaking.
###
@@ -111,6 +113,7 @@ shell: build-dirs
-v "${HOME}/.kube:/root/.kube" \
-v "$(PWD):/go/src/$(PKG)" \
-v "$(PWD)/bin/$(ARCH):/go/bin" \
+ -v "$(DOCKER_CONFIG):/root/.docker" \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/$(PKG) \
$(BUILD_IMAGE) \
@@ -200,6 +203,7 @@ ifeq ($(DOCKER_BUILD),"true")
-v "$(PWD):/go/src/$(PKG)" \
-v "$(PWD)/bin/$(ARCH):/go/bin" \
-v "$(PWD)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)" \
+ -v "$(DOCKER_CONFIG):/root/.docker" \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/$(PKG) \
$(BUILD_IMAGE) \
