Docker
TMA-DOCKER-6.2
Ensure that container sprawl is avoided
NiedrigStufe 1Manuelle Prüfungdocker
Beschreibung
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.
So wird geprüft
Prüfmethode: Manuelle Prüfung
Diese Empfehlung kann nicht automatisch geprüft werden. Ein Scan führt sie mit diesen Anweisungen auf, wenn Sie --include-manual übergeben.
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.
So wird behoben
Behebungsmethode: Anleitung oder Infrastruktur-Patch
Remove unused containers: docker container prune (or docker rm <id> for specific containers) after confirming they are not needed.
Eigenschaften
- Betriebssysteme
- Beliebig
- Tags
- dockeroperations
- Referenz
- CIS Docker Benchmark v1.9.0 - 6.2 Ensure that container sprawl is avoided