mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-11-01 10:38:02 +00:00
[docker-lldp] limit privileged flag for lldp container (#15830)
#### Why I did it HLD implementation: Container Hardening (https://github.com/sonic-net/SONiC/pull/1364) ##### Work item tracking - Microsoft ADO **(number only)**: 14807420 #### How I did it Reduce linux capabilities in privileged flag, retain NET_ADMIN capability
This commit is contained in:
@@ -28,7 +28,7 @@ SONIC_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_DBG)
|
|||||||
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_DBG)
|
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_DBG)
|
||||||
|
|
||||||
$(DOCKER_LLDP)_CONTAINER_NAME = lldp
|
$(DOCKER_LLDP)_CONTAINER_NAME = lldp
|
||||||
$(DOCKER_LLDP)_RUN_OPT += --privileged -t
|
$(DOCKER_LLDP)_RUN_OPT += -t --cap-add=NET_ADMIN
|
||||||
$(DOCKER_LLDP)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
$(DOCKER_LLDP)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
|
||||||
$(DOCKER_LLDP)_RUN_OPT += -v /etc/timezone:/etc/timezone:ro
|
$(DOCKER_LLDP)_RUN_OPT += -v /etc/timezone:/etc/timezone:ro
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user