-
Notifications
You must be signed in to change notification settings - Fork 46
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 tip about unused docker volumes cleaning #5815
Conversation
for vol in $(docker volume ls | awk '{print $2}' | grep -v VOLUME) | ||
do | ||
docker volume rm $vol | ||
done |
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.
Why not using?
docker system prune --volumes
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.
I have added the tip, as mentioned in https://techan.fr/docker-chasse-a-lespace-perdu-gare-aux-volumes.html and used by @yjacolin for customers that recently had disk space issues. I have no clue if both commands do the same thing.
@yjacolin what do you think? Have customers used the prune command as well?
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.
@yjacolin Oops, I should have read your next comment before posting :P
do | ||
docker volume rm $vol | ||
done | ||
|
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.
For last release of Docker you can use::
docker system prune --volumes
or::
docker system prune --all
For me, we (especially me) are wrong, the old version war correct because here we are speaking about Docker < 1.13 who don't support |
@sbrunner You're right, thanks! Then the section I am editing is for Docker < 1.13 and it's better to document the old way only, based on the @yjacolin Do you maintain your change request? @jwkaltz Thanks for your review! |
@@ -66,12 +66,23 @@ Otherwise: | |||
docker images | grep "<none>" | awk '{print $3}' | xargs --no-run-if-empty docker rmi || true | |||
docker volume ls --quiet --filter dangling=true | grep '[0-9a-f]\{64\}' | xargs --no-run-if-empty docker volume rm | |||
|
|||
This will remove:: | |||
This will remove: |
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.
Are you sure about this change?
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.
Yes, else the following bullet points are not interpreted and displayed as a code section.
See https://github.com/camptocamp/c2cgeoportal/blob/master/doc/integrator/docker.rst#clean
Here is how the page looks like after my changes:
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.
+1 thanks :-)
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.
Many thanks :-)
Jenkins has finally passed. I will merge the PR soon if no one objects in the meantime. |
This PR adds instructions to remove "ghost" volumes, as described at https://techan.fr/docker-chasse-a-lespace-perdu-gare-aux-volumes.html > "Les volumes “fantômes”", pointed by @yjacolin
By the way I have dropped a reference to ExtJS in the documentation opening page :P
(Doc successfully built on my laptop)