Question

Store all the docker data on a external volume

Posted November 5, 2021 91 views
UbuntuMiscellaneousDockerDigitalOcean Volumes

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.

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.

×
Submit an Answer
1 answer

Hello,

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:

https://www.digitalocean.com/community/questions/how-to-move-the-default-var-lib-docker-to-another-directory-for-docker-on-linux

Hope that this helps!
Best,
Bobby