-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docker_prune sample to remove everything, including non-dangling images #52744
Conversation
##### SUMMARY Add example to remove everything, including non-dangling images ##### ISSUE TYPE - Docs Pull Request +label: docsite_pr
The test
The test
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one problem with this example: dangling: false
is the default value for the dangling
filter, so your example does the same thing as the example above it. (See documentation of prune_images.)
So maybe you should change the description of the example above to "(including non-dangling images)", and change the description of this example to '(excluding non-dangling images, i.e. same behavior as docker system prune)" and set dangling: true
.
Are you sure about it?. I made a test, having two images (one dangling, and the other non-dangling):
And no containers using them:
Using default values with
After running the playbook, the non-dangling image (not used by any containers) is still there:
I think this is the expected behavior, since Let me know if I'm wrong!. In that case, the suggested example should not be there 😬. By the way, these are the versions of Docker/API/Ansible:
|
Co-Authored-By: nicosingh <nicolas.singh@gmail.com>
No, I'm not sure, I find the documentation a bit confusing :) I've also just tested it, you're totally right: specifying |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit
bot_status |
@nicosingh thanks a lot for adding this example! It will appear (together with the new module) in Ansible 2.8. |
SUMMARY
Add
docker_prune
example to remove everything, including non-dangling images.ISSUE TYPE
+label: docsite_pr
SUMMARY
Given the condition that (by default)
docker system prune
only removes dangling images, it would be a good idea to show an example usingdangling=true
filter.ISSUE TYPE
COMPONENT NAME
docker_prune.py
ADDITIONAL INFORMATION
N/A