[Makefile]: Set build directory as docker workdir (#832)

Signed-off-by: marian-pritsak <marianp@mellanox.com>
This commit is contained in:
Marian Pritsak 2017-07-24 12:29:36 +03:00 committed by GitHub
parent bc4ee14340
commit 7cf8479182

View File

@ -14,6 +14,7 @@ SLAVE_IMAGE = sonic-slave-$(USER)
DOCKER_RUN := docker run --rm=true --privileged \ DOCKER_RUN := docker run --rm=true --privileged \
-v $(PWD):/sonic \ -v $(PWD):/sonic \
-w /sonic \
-i$(if $(TERM),t,) -i$(if $(TERM),t,)
DOCKER_BUILD = docker build --no-cache \ DOCKER_BUILD = docker build --no-cache \
@ -34,7 +35,6 @@ DOCKER_BUILD = docker build --no-cache \
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \ { echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
$(DOCKER_BUILD) ; } $(DOCKER_BUILD) ; }
@$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) make \ @$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) make \
-C sonic \
-f slave.mk \ -f slave.mk \
PLATFORM=$(PLATFORM) \ PLATFORM=$(PLATFORM) \
BUILD_NUMBER=$(BUILD_NUMBER) \ BUILD_NUMBER=$(BUILD_NUMBER) \