What’s the best way to manage Docker data storage?

0
10
Asked By TechWhiz123 On

I'm running Docker on a Linux machine and trying to decide on the best strategy for data storage management. Should I change the default data directory for Docker (the volumes and images) to another disk, or is it more practical to stick with the default setup and just use bind mounts to point specific containers to folders on an external disk? My main goal is to maintain a clean and robust system without diving too deep into Docker's internal configurations. I'm curious to hear what experiences others have had, especially regarding storage limitations or the benefits of separating container logic from data management. Any tips or lessons learned would be greatly appreciated!

1 Answer

Answered By LazyDev007 On

I usually prefer to keep things as default as possible. It reduces the need for documentation and makes redeployments simpler. For data, I typically use Docker's default mounts for less critical data like logs or databases I don't care too much about. Important stuff like site files goes on bind mounts, often on a separate drive. Since I'm running everything in a VM, I can easily manage the external drive without affecting my OS drive.

SimpleSolutions9 -

Totally agree! Keeping things default can save so much trouble later on when you need to redeploy. I was considering switching to volumes, but I'm starting to think that could complicate things.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.