Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Following Stephen Kitt's excelent observation, it appears that -f flag is not necessary. However, after a bit further digging I've discovered that `docker system prune` will provide us with all this functionality, so why reimplment ;) For reference (if you're lazy): $ docker system prune --help Usage: docker system prune [OPTIONS] Remove unused data Options: -a, --all Remove all unused images not just dangling ones --filter filter Provide filter values (e.g. 'label=<key>=<value>') -f, --force Do not prompt for confirmation --volumes Prune volumes $ docker system prune --volumes WARNING! This will remove: - all stopped containers - all networks not used by at least one container - all volumes not used by at least one container - all dangling images - all dangling build cache Are you sure you want to continue? [y/N]
- Loading branch information