ZZROTDesign/docker-clean
ZZROTDesign/docker-clean has 1,290 GitHub stars and 87 forks. GitHot measured 0 in 7 days. Last checked 2026-11-11 09:53 UTC. Last push 2018-01-16.
Comment ces chiffres sont mesurés
A script that cleans docker containers, images, volumes, and networks.
What you can do
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
Progression mesurée des étoiles
- in 24h
- Mise à jour retardée
- in 7 days
- 0
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalDocker-Clean
A simple Shell script to clean up the Docker Daemon.
Requirements
In order to use the volume capabilities, it is required that the Docker Daemon is at least version 1.9+
Install
curl -s https://raw.githubusercontent.com/ZZROTDesign/docker-clean/v2.0.4/docker-clean |
sudo tee /usr/local/bin/docker-clean > /dev/null && \
sudo chmod +x /usr/local/bin/docker-clean
Homebrew Install
brew update
brew install docker-clean
UPDATE: Docker-clean v2.0.3+ will be available without using our tap. However we will keep both maintained.
Upgrade (for new versions)
brew update && brew upgrade docker-clean
For curl installs, re-running the script above will install the newest version.
Running from a docker container
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock zzrot/docker-clean [optional flags below]
Docker Image tags can be found on Docker Hub for different docker-clean versions 2.0.4+ with various image sizes.
Usage
For a more in depth look at the usage and commands run without browsing the script itself check out our USAGE.md.
docker-clean [optional flags below]
Default without arguments deletes stopped containers, dangling volumes, and untagged images.
stop Stops and removes all containers, cleans dangling volumes, and networks
images Removes all tagged and untagged images, stopped containers, dangling volumes, and networks
run Removes all stopped containers, untagged images, dangling volumes, and networks
all Stops and removes all containers, images, volumes and networks
"Additional Flag options:"
-n or --dry-run Adding this additional flag will list items to be
removed without executing any stopping or removing commands"
-s or --stop Stops all running containers
-c or --containers Removes all stopped containers
-i or --images Removes all untagged images
-net or --networks Removes all empty Networks (all network cleans are only empty)
-H or --host Specifies the docker host to run against
Useful for docker swarm maintenance ie: -H 127.0.0.1:4000"
-r or --restart Restarts the docker machine/daemon
-d or --created By default, CREATED containers are set to be removed. Adding this
flag will ensure that all created containers are not cleaned
-t or --tagged Removes all tagged images
-a or --all Stops and removes all Containers, Images, AND Restarts docker
-l or --log Adding this as an additional flag will list all
image, volume, and container deleting output
Contributing to Docker-Clean
Team members
- Sean Kilgarriff [email protected] T: @seankilgarriff
- Killian Brackey [email protected] T: @kmbrackey
Don't hesitate to get in contact with either one of us with problems, questions, etc.
Check out our blog post on why we put this script together.
Adding new features
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
For any new features you hope to see, you can also edit the REQUESTS.md file. https://github.com/ZZROTDesign/docker-clean/blob/master/REQUESTS.md
Don’t get discouraged! We estimate that the response time from the maintainers is around: 24 hours.
ShellCheck
We use ShellCheck to keep our code consistent and readable. Any feature pushed that does not pass a ShellCheck will fail on Travis build, and thus we cannot accept the pull request. Please lint your code before submitting it! :).
(Keep in mind that bats does not have to be ShellChecked, and thus if you are adding tests to .bats don't worry about linting.)
You can either download the ShellCheck program: https://github.com/koalaman/shellcheck or use the ShellCheck website: http://www.shellcheck.net/
License
The code is available under the MIT License.
Explorer des projets similaires
codecrafters-io/build-your-own-x
Maîtrisez la programmation en recréant de zéro vos technologies préférées.
561,732 étoilespublic-apis/public-apis
Une liste collective d'API gratuites
498,143 étoilesmorluto/rea
Rétro-ingénierie de n'importe quoi avec des agents, du comportement des applications jusqu'aux binaires natifs.
451,565 étoilesopenclaw/openclaw
L'IA qui fait vraiment les choses. Tout système d'exploitation, toute plateforme. À la manière du homard. 🦞
394,331 étoiles