Skip to content

Commit

Permalink
[docker-lldp] limit privileged flag for lldp container (#15830)
Browse files Browse the repository at this point in the history
#### Why I did it
HLD implementation: Container Hardening (sonic-net/SONiC#1364)
##### Work item tracking
- Microsoft ADO **(number only)**: 14807420

#### How I did it
Reduce linux capabilities in privileged flag, retain NET_ADMIN capability
  • Loading branch information
maipbui authored Aug 15, 2023
1 parent cf72683 commit 030c572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/docker-lldp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SONIC_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_DBG)
SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_LLDP_DBG)

$(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/timezone:/etc/timezone:ro

Expand Down

0 comments on commit 030c572

Please sign in to comment.