[build]: Move the mounting point inside the docker to home directory (#1522)

* Move the mounting point inside the docker to home directory

Signed-off-by: Wenda <wenni@microsoft.com>

* Change mount point to src under the home directory

Signed-off-by: Wenda <wenni@microsoft.com>
This commit is contained in:
Wenda Ni, Ph.D 2018-03-24 02:36:48 -07:00 committed by lguohan
parent 25d73ef1a1
commit 17b09ef06a

View File

@ -14,7 +14,7 @@
# * USERNAME: Desired username -- default at rules/config
# * PASSWORD: Desired password -- default at rules/config
# * KEEP_SLAVE_ON: Keeps slave container up after building-process concludes.
# * SOURCE_FOLDER: host path to be mount as /var/src, only effective when KEEP_SLAVE_ON=yes
# * SOURCE_FOLDER: host path to be mount as /var/$(USER)/src, only effective when KEEP_SLAVE_ON=yes
# * SONIC_BUILD_JOB: Specifying number of concurrent build job(s) to run
#
###############################################################################
@ -85,7 +85,7 @@ SONIC_BUILD_INSTRUCTION := make \
$(DOCKER_BUILD) ; }
ifeq "$(KEEP_SLAVE_ON)" "yes"
ifdef SOURCE_FOLDER
@$(DOCKER_RUN) -v $(SOURCE_FOLDER):/var/src $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash"
@$(DOCKER_RUN) -v $(SOURCE_FOLDER):/var/$(USER)/src $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash"
else
@$(DOCKER_RUN) $(SLAVE_IMAGE):$(SLAVE_TAG) bash -c "$(SONIC_BUILD_INSTRUCTION) $@; /bin/bash"
endif