How to move Docker to a new location in Ubuntu

First check if your Docker is running by:

$ sudo systemctl status docker

But, if it was not working, you may start it with:

$ sudo systemctl start docker

Then, see where your Docker data loop is located:

$ docker info

If you wish to move it to a new place, you should first stop the service:

$ sudo systemctl stop docker

Move existing docker directory to new location

$ sudo mv /var/lib/docker/ /path/to/new/docker/

Create symbolic link to new location

$ sudo ln -s /path/to/new/docker/ /var/lib/docker

Finally, start docker servic

$ sudo systemctl start docker