Prune Objects in Docker
generally, Docker doesn’t remove unused objects (images, containers, volumes, and networks) from the system unless you explicitly ask Docker to do so. It provides an option to Prune the unused objects from the system.
Syntax:
Where an object can be an image, continue volume, or a network.
Prune All Unused Objects
This will remove all unused objects like images, containers, volumes, and networks from the system.
The –all option will remove all unused images
The filtering flag (-f or –filter) format is “key=value”. Like until (
Prune Images
This will remove all unused images from the system.
Prune Containers:
This will remove all unused volumes from the system.
–filter Provide filter values (e.g. ‘label=’)
–force , -f false Do not prompt for confirmation
Prune Volume:
This will remove all unused volumes from the system.
–filter Provide filter values (e.g. ‘label=’)
–force , -f false Do not prompt for confirmation
Prune Network:
This will remove all unused docker networks from the system.
–filter Provide filter values (e.g. ‘label=’)
–force , -f false Do not prompt for confirmation
0 Comments
CAN FEEDBACK
Emoji