Services and User Management
A build server's disk is nearly full because it holds hundreds of old tagged images that no container uses. An administrator must remove every image not used by a container, but must keep all stopped containers and named volumes. Which command does this without a confirmation prompt?
Show the answer
Correct answerA. docker image prune -a -f
docker image prune -a removes all images not referenced by any container, and -f skips the prompt. Plain docker image prune -f removes only dangling images, so the old tagged images would stay. The system prune would also delete stopped containers and volumes.