diff --git a/Makefile b/Makefile index 58f4dffd8e..03239f3cf5 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,6 @@ # get OS/Arch of docker engine DOCKER_ENGINE_OSARCH = $(shell docker version | grep 'OS/Arch' | tail -1 | cut -d':' -f2 | tr -d '[[:space:]]') -DOCKER_ENGINE_GOOS = $(word 1, $(subst /, ,$(DOCKER_ENGINE_OSARCH))) -DOCKER_ENGINE_GOARCH = $(word 2, $(subst /, ,$(DOCKER_ENGINE_OSARCH))) -export DOCKER_ENGINE_OSARCH -export DOCKER_ENGINE_GOOS -export DOCKER_ENGINE_GOARCH # default for linux/amd64 and others DOCKER_FILE = Dockerfile # switch to different Dockerfile for linux/arm @@ -22,9 +17,6 @@ DOCKER_ENVS := \ -e BUILDFLAGS \ -e DOCKER_CLIENTONLY \ -e DOCKER_DEBUG \ - -e DOCKER_ENGINE_GOARCH \ - -e DOCKER_ENGINE_GOOS \ - -e DOCKER_ENGINE_OSARCH \ -e DOCKER_EXPERIMENTAL \ -e DOCKER_FILE \ -e DOCKER_GRAPHDRIVER \ diff --git a/hack/make/.integration-daemon-setup b/hack/make/.integration-daemon-setup index ab9d45c32c..9a0feeab44 100644 --- a/hack/make/.integration-daemon-setup +++ b/hack/make/.integration-daemon-setup @@ -1,5 +1,12 @@ #!/bin/bash +# Retrieve OS/ARCH of docker daemon, eg. linux/amd64 +export DOCKER_ENGINE_OSARCH=$(docker version | grep 'OS/Arch' | tail -1 | cut -d':' -f2 | tr -d '[[:space:]]') +# Retrieve OS of docker daemon, eg. linux +export DOCKER_ENGINE_GOOS=$(echo $DOCKER_ENGINE_OSARCH | cut -d'/' -f1) +# Retrieve ARCH of docker daemon, eg. amd64 +export DOCKER_ENGINE_GOARCH=$(echo $DOCKER_ENGINE_OSARCH | cut -d'/' -f2) + bundle .ensure-emptyfs bundle .ensure-frozen-images bundle .ensure-httpserver