Docker
TMA-DOCKER-6.2
Ensure that container sprawl is avoided
NiskaNivo 1Ručni pregleddocker
Opis
Large numbers of stopped containers waste resources and hide stale, unpatched workloads. Whether the count is excessive is a site decision, so this is a manual review.
Kako se proverava
Metod provere: Ručni pregled
Ova preporuka se ne može proveriti automatski. Skeniranje je navodi sa ovim uputstvima kada prosledite --include-manual.
Review container sprawl: compare docker info --format '{{ .ContainersStopped }}' with docker info --format '{{ .ContainersRunning }}', list stopped containers with docker ps -a --filter status=exited and remove the ones no longer needed.
Kako se ispravlja
Metod ispravke: Smernica ili zakrpa infrastrukture
Remove unused containers: docker container prune (or docker rm <id> for specific containers) after confirming they are not needed.
Svojstva
- Operativni sistemi
- Bilo koji
- Oznake
- dockeroperations
- Referenca
- CIS Docker Benchmark v1.9.0 - 6.2 Ensure that container sprawl is avoided