Skip to content
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

Merged
merged 2 commits into from
Feb 17, 2020
Merged

Add tip about unused docker volumes cleaning #5815

merged 2 commits into from
Feb 17, 2020

Conversation

asaunier
Copy link
Member

@asaunier asaunier commented Feb 13, 2020

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)

doc/integrator/docker.rst Outdated Show resolved Hide resolved
for vol in $(docker volume ls | awk '{print $2}' | grep -v VOLUME)
do
docker volume rm $vol
done
Copy link
Member

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 

Copy link
Member Author

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?

Copy link
Member Author

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

Copy link
Member

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

@asaunier
Copy link
Member Author

@yjacolin @sbrunner I have updated the PR to use "system prune --volumes".
Or should we mention also the other command (see d7f3764) for older versions of Docker?

@sbrunner
Copy link
Member

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 Docker system prune...

@asaunier
Copy link
Member Author

@sbrunner You're right, thanks!
By the way, I hadn't paid attention to this but the doc was already mentioning docker system prune for Docker >= 1.13, a few lines above:
See https://github.com/camptocamp/c2cgeoportal/blob/master/doc/integrator/docker.rst#clean

Then the section I am editing is for Docker < 1.13 and it's better to document the old way only, based on the for loop. I have updated my PR and squashed the previous fixups.

@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:
Copy link
Member

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?

Copy link
Member Author

@asaunier asaunier Feb 17, 2020

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:

Screenshot from 2020-02-17 11-13-38

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 thanks :-)

Copy link
Member

@sbrunner sbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks :-)

@asaunier asaunier changed the base branch from master to 2.4 February 17, 2020 10:48
@asaunier
Copy link
Member Author

@sbrunner Since you have already done some related changes against branch master in PR #5832 I have updated the current PR to merge to branch 2.4 instead of master.

@asaunier
Copy link
Member Author

Jenkins has finally passed. I will merge the PR soon if no one objects in the meantime.

@asaunier asaunier merged commit 2da4ed3 into 2.4 Feb 17, 2020
@asaunier asaunier deleted the docker-doc branch February 17, 2020 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants