Complete the command to list disk usage of Docker images.
docker system [1]The docker system df command shows disk usage of Docker images, containers, and volumes.
Complete the command to remove all stopped containers and unused images.
docker system [1]The docker system prune command removes all stopped containers, unused networks, dangling images, and build cache.
Fix the error in the command to remove dangling images.
docker image rm $(docker images -f "dangling=[1]" -q)
To remove dangling images, the filter dangling=true is used to select images not tagged and unused.
Fill both blanks to create a command that removes all unused volumes and networks.
docker volume [1] && docker network [2]
The docker volume prune and docker network prune commands remove all unused volumes and networks respectively.
Fill all three blanks to create a dictionary comprehension that maps container IDs to their size if size is greater than 100MB.
sizes = [1]: [2] for c in containers if c['SizeRootFs'] [3] 100*1024*1024
This comprehension creates a dictionary with container IDs as keys and their sizes as values, filtering only those larger than 100MB.