Docker: How to set-up custom storage

By default, docker saves its images to overlay of ExtFS which is not ideal and definitely not recommended for production use.

This short tutorial will help you to set-up custom storage on LVM Volume or partition.

systemctl stop docker
rm -rf /var/lib/docker/
docker-storage-config -d /dev/vg/docker -s overlay2 -f
systemctl start docker