ZZROTDesign/docker-clean

flag provided but not defined: -f

Closed this issue · 3 comments

1. What version of Docker-Clean are you running (docker-clean --version)?

docker-clean: 2.0.1

2. What command are you trying to run?

docker-clean

3. What did you expect to see?

Cleaning images...
Images cleaned: 11
You've cleared approximately MB: 220 of space!
Cleaning existing dangling volumes...
Volumes cleaned: 13
Removing empty networks...
Networks removed: 3

4. What did you see instead ( 'docker-clean -l or --verbose' for the entire log )?

flag provided but not defined: -f
See 'docker network inspect --help'.
flag provided but not defined: -f
flag provided but not defined: -f
See 'docker network inspect --help'.
flag provided but not defined: -f
flag provided but not defined: -f
See 'docker network inspect --help'.
flag provided but not defined: -f
flag provided but not defined: -f
See 'docker network inspect --help'.
flag provided but not defined: -f
flag provided but not defined: -f
See 'docker network inspect --help'.
flag provided but not defined: -f
flag provided but not defined: -f
See 'docker network inspect --help'.
flag provided but not defined: -f
Cleaning images...
Images cleaned: 11
You've cleared approximately MB: 220 of space!
Cleaning existing dangling volumes...
Volumes cleaned: 13
Removing empty networks...
Networks removed: 3

5. What are your system specs?

Docker Version: 1.9.1
Docker-Machine Version: docker-machine version 0.5.1 (7e8e38e)
OS/Version: OS X 10.11.4 (El Capitan)

Thanks for reporting this bug and filling out the questions above -- that is very helpful. It looks like the -f flag for docker network inspect is not supported by Docker Version:1.9.1. It was added in Docker 1.10 (see changelog). We are looking into avoiding the use of this flag currently for better compatibility with older versions.

This should now be fixed in v2.0.2. Due to bash limitations we are skipping network cleaning with older versions of Docker before the network filter option was introduced in 1.10.0.

To upgrade:
If you installed via homebrew:

brew update
brew upgrade docker-clean

via curl:

curl -s https://raw.githubusercontent.com/ZZROTDesign/docker-clean/v2.0.2/docker-clean | sudo tee /usr/local/bin/docker-clean > /dev/null && \ sudo chmod +x /usr/local/bin/docker-clean

wow that was fast 👍