Docker
TMA-DOCKER-6.2
Ensure that container sprawl is avoided
BajaNivel 1Revisión manualdocker
Descripción
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.
Cómo se verifica
Método de auditoría: Revisión manual
Esta recomendación no se puede verificar automáticamente. Un escaneo la lista con estas instrucciones cuando se pasa --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.
Cómo se corrige
Método de corrección: Guía o parche de infraestructura
Remove unused containers: docker container prune (or docker rm <id> for specific containers) after confirming they are not needed.
Propiedades
- Sistemas operativos
- Cualquiera
- Etiquetas
- dockeroperations
- Referencia
- CIS Docker Benchmark v1.9.0 - 6.2 Ensure that container sprawl is avoided