Docker Compose down does not remove volumes

I was trying to fix a deployment issue on one of my Docker setup where source code is being pulled periodically from master branch inside a volume, however, I ended up having the same outdated branch over and over again. It turns out that docker-compose down won’t remove named volumes by default.

To fix the issue, simply add the -v flag.

sudo docker-compose down -v

That’s it!

This entry was posted in Web Development and tagged , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *