[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
[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
tofor 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