diff --git a/Makefile.work b/Makefile.work index f737a9a7d8..e678791d59 100644 --- a/Makefile.work +++ b/Makefile.work @@ -69,6 +69,7 @@ USER := $(shell id -un) PWD := $(shell pwd) USER_LC := $(shell echo $(USER) | tr A-Z a-z) DOCKER_MACHINE := $(shell docker run --rm debian:buster uname -m) +HOST_DOCKERD_GID := $(shell getent group docker | cut -d : -f3) comma := , @@ -389,7 +390,7 @@ endif ifeq ($(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD), y) ifneq ($(MULTIARCH_QEMU_ENVIRON), y) - DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock + DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock --group-add $(HOST_DOCKERD_GID) endif endif