Skip to content

Ensure image sprawl is avoided miscalculation #532

@halfluke

Description

@halfluke

[INFO] 6 - Docker Security Operations
[INFO] 6.1 - Ensure that image sprawl is avoided (Manual)
[INFO] * There are currently: 14 images
[INFO] * Only 0 out of 14 are in use

fix: change
for c in $(docker inspect --format "{{.Image}}" "$(docker ps -qa)" 2>/dev/null); do
to
for c in $(docker inspect --format "{{.Image}}" $(docker ps -qa) 2>/dev/null); do

The first command returns an error for the first image and the whole count fails

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions