diff --git a/Makefile.work b/Makefile.work index 94571239e0a5..6c4828134a8a 100644 --- a/Makefile.work +++ b/Makefile.work @@ -63,9 +63,17 @@ OVERLAY_MODULE_CHECK := lsmod | grep "^overlay " > /dev/null 2>&1 || (echo "ERRO BUILD_TIMESTAMP := $(shell date +%Y%m%d\.%H%M%S) +ifeq ($(DOCKER_BUILDER_MOUNT),) +override DOCKER_BUILDER_MOUNT := "$(PWD):/sonic" +endif + +ifeq ($(DOCKER_BUILDER_WORKDIR),) +override DOCKER_BUILDER_WORKDIR := "/sonic" +endif + DOCKER_RUN := docker run --rm=true --privileged \ - -v $(PWD):/sonic \ - -w /sonic \ + -v $(DOCKER_BUILDER_MOUNT) \ + -w $(DOCKER_BUILDER_WORKDIR) \ -e "http_proxy=$(http_proxy)" \ -e "https_proxy=$(https_proxy)" \ -i$(if $(TERM),t,)