[bookworm] Fix docker gid mismatch with host (#17158)
* [bookworm] Fix docker gid mismatch with host * Use group-add arg instead of update sonic-slave user Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
This commit is contained in:
parent
a8e4fb1aaa
commit
98fc38ebec
@ -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 := ,
|
||||
|
||||
@ -387,7 +388,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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user