Merge pull request #39069 from thaJeztah/fix_cross

Fix DOCKER_CROSS being overwritten
This commit is contained in:
Brian Goff 2019-04-15 16:01:09 -07:00 committed by GitHub
commit ce1f7a186e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,9 @@
DOCKER_GRAPHDRIVER := $(if $(DOCKER_GRAPHDRIVER),$(DOCKER_GRAPHDRIVER),$(shell docker info 2>&1 | grep "Storage Driver" | sed 's/.*: //'))
export DOCKER_GRAPHDRIVER
# enable/disable cross-compile
DOCKER_CROSS ?= false
# get OS/Arch of docker engine
DOCKER_OSARCH := $(shell bash -c 'source hack/make/.detect-daemon-osarch && echo $${DOCKER_ENGINE_OSARCH}')
DOCKERFILE := $(shell bash -c 'source hack/make/.detect-daemon-osarch && echo $${DOCKERFILE}')
@ -139,8 +142,6 @@ cross: build ## cross build the binaries for darwin, freebsd and\nwindows
ifdef DOCKER_CROSSPLATFORMS
build: DOCKER_CROSS := true
else
build: DOCKER_CROSS ?= false
endif
ifeq ($(BIND_DIR), .)
build: DOCKER_BUILD_OPTS += --target=dev