Store all the docker data on a external volume

I am using a basic droplet to host some docker containers. But my drive is starting to fill up and because i don’t need extra cpu and ram i want to add a volume to my droplet. Only my question is how do point docker to store all the data on the new volume.

Thanks in advance.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


Yes, this should be doable. I recently had a similar situation. You can follow the steps here on how to move the default /var/lib/docker to another directory here:

Hope that this helps! Best, Bobby