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!