Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
I discovered this when I was trying to learn docker and I noticed I was unintentionally orphaning docker volumes.
It seems to me that there are several files you may want to keep between updates such as the conf directories. I've found this issue on why for nginx most of those are not included in the volume.
Other then the potential performance reasons mentioned by @sherter, I can't see why the cache would be a special case. As such perhaps it may be better to remove it for consistency, or have it documented on docker hub/_/nginx readme so people don't make the mistake of orphaning volumes.
I agree with this, at least document it in the readme.