I would like to change the docker data directory on Ubuntu Server 18.04. I am using Alibaba Cloud and have added a data disk of 100 GB which I mounted on /data.
So, instead of /var/lib/docker, I want Docker to use /data/docker.
I am using the latest stable version of docker.
There are many tutorials on the Internet that give different ways of doing it, but I am not sure of the right one… Please help me.
I am also doing the Docker Mastery course on Udemy, where I asked the same question, but no one replied.
Server: Docker Engine - Community Engine: Version: 18.09.3 API version: 1.39 (minimum version 1.12)