@@ -301,8 +301,8 @@ endif
301
301
ifeq ($(DOCKER_BUILDER_WORKDIR),)
302
302
override DOCKER_BUILDER_WORKDIR := "/sonic"
303
303
endif
304
-
305
- DOCKER_RUN := docker run --rm=true --privileged --init \
304
+ HOSTNET := --network=host
305
+ DOCKER_RUN := docker run $(HOSTNET) --rm=true --privileged --init \
306
306
-v $(DOCKER_BUILDER_MOUNT) \
307
307
-v "$(DOCKER_LOCKDIR):$(DOCKER_LOCKDIR)" \
308
308
-w $(DOCKER_BUILDER_WORKDIR) \
@@ -321,6 +321,7 @@ ifneq ($(DOCKER_BUILDER_USER_MOUNT),)
321
321
DOCKER_RUN += $(foreach mount,$(subst $(comma), ,$(DOCKER_BUILDER_USER_MOUNT)), $(addprefix -v , $(mount)))
322
322
endif
323
323
324
+ DOCKER_RUN += --mount type=tmpfs,destination=/bld-tmp,tmpfs-mode=1777
324
325
ifdef SONIC_BUILD_QUIETER
325
326
DOCKER_RUN += -e "SONIC_BUILD_QUIETER=$(SONIC_BUILD_QUIETER)"
326
327
endif
@@ -423,7 +424,8 @@ DOCKER_BASE_LOG = $(SLAVE_DIR)/$(SLAVE_BASE_IMAGE)_$(SLAVE_BASE_TAG).log
423
424
DOCKER_LOG = $(SLAVE_DIR)/$(SLAVE_IMAGE)_$(SLAVE_TAG).log
424
425
425
426
426
- DOCKER_SLAVE_BASE_BUILD = docker build --no-cache \
427
+ DOCKER_AUTH:=docker login -u sonicbrcm -p 4b5d1f28-6f43-41da-a794-88805ee8fc2d
428
+ DOCKER_SLAVE_BASE_BUILD = $(DOCKER_AUTH);docker build $(HOSTNET) --no-cache \
427
429
-t $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) \
428
430
--build-arg http_proxy=$(http_proxy) \
429
431
--build-arg https_proxy=$(https_proxy) \
@@ -433,10 +435,10 @@ DOCKER_SLAVE_BASE_BUILD = docker build --no-cache \
433
435
$(SLAVE_DIR) \
434
436
$(SPLIT_LOG) $(DOCKER_BASE_LOG)
435
437
436
- DOCKER_BASE_PULL = docker pull \
437
- $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_PATH) /$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)
438
+ DOCKER_BASE_PULL = $(DOCKER_AUTH); docker pull \
439
+ $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)
438
440
439
- DOCKER_USER_BUILD = docker build --no-cache \
441
+ DOCKER_USER_BUILD = $(DOCKER_AUTH); docker build $(HOSTNET) --no-cache \
440
442
--build-arg user=$(USER) \
441
443
--build-arg uid=$(shell id -u) \
442
444
--build-arg guid=$(shell id -g) \
0 commit comments