Skip to content

Commit 7c3a063

Browse files
committed
[build] Add DOCKER_USER_ENV option
1 parent 5ce2a71 commit 7c3a063

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Makefile.work

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@ ifneq ($(SIGNING_CERT),)
348348
endif
349349
endif
350350

351+
# Allow user-defined environmental variables to be imported into the build containers
352+
ifneq ($(DOCKER_USER_ENV),)
353+
DOCKER_RUN += $(foreach var,$(subst $(comma), ,$(DOCKER_USER_ENV)), $(addprefix -e , $(var)))
354+
endif
355+
351356
# User name and tag for "docker-*" images created by native dockerd mode.
352357
ifeq ($(strip $(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD)),y)
353358
DOCKER_USERNAME = $(USER_LC)

0 commit comments

Comments
 (0)