From 17b09ef06a7efe230daccc82bb38e51819bcfc5d Mon Sep 17 00:00:00 2001 From: "Wenda Ni, Ph.D" Date: Sat, 24 Mar 2018 02:36:48 -0700 Subject: [PATCH] [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 * Change mount point to src under the home directory Signed-off-by: Wenda --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index da5f0a282b..ed0c853e22 100644 --- a/Makefile +++ b/Makefile @@ -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