[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:
parent
25d73ef1a1
commit
17b09ef06a
4
Makefile
4
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
|
||||
|
Loading…
Reference in New Issue
Block a user