Description
In order to ease the pruning of containers in dev environment, it would be awesome if a -y flag can be provided. I would typically expect this flag to behave similarly with the behavior of sudo apt-get install -y command in Ubuntu.
Steps to reproduce the issue:
$ docker container prune
Describe the results you received:
$ WARNING! This will remove all images without at least one container associated to them.
$ Are you sure you want to continue? [y/N]
Describe the results you desire:
IMHO, being capable to run the following command on my dev machine really helps in improving the developer experience 👍
$ docker container prune -y
$ I removed dangling containers boss
docker container prune -f does this.
$ docker container prune --help
Usage: docker container prune [OPTIONS]
Remove all stopped containers
Options:
--filter filter Provide filter values (e.g. 'until=<timestamp>')
-f, --force Do not prompt for confirmation
I hope that ‘-y’ becomes an alias of ‘-f’ because it feels confusing that the cli is asking yes or no but requires ‘-f’ as a flag 🤪🤪🤪
Most helpful comment
docker container prune -fdoes this.