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

--remove-volumes doesn't work as expected with named volumes #383

Closed
leninalive opened this issue Sep 26, 2019 · 2 comments
Closed

--remove-volumes doesn't work as expected with named volumes #383

leninalive opened this issue Sep 26, 2019 · 2 comments

Comments

@leninalive
Copy link

When using named volumes with docker-compose and watchtower, it won't remove named volumes with --remove-volumes argument (will only deassociate them from container) though volume contents won't be updated.

Is it possible to change this behavior and perform something like docker volume prune after container has been stopped and removed?

@welcome
Copy link

welcome bot commented Sep 26, 2019

Hi there!
Thanks a bunch for opening your first issue! 🙏 As you're new to this repo, we'd like to suggest that you read our code of conduct

@simskij
Copy link
Member

simskij commented Jan 10, 2020

Hey there!

You should be able to do this already using lifecycle hooks. For instance, you could add a script running docker volume prune on post-update. Another solution, which I tend to utilize myself, is to add a cronjob running the prune command every night.

@simskij simskij closed this as completed Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants