1. Stop the docker daemon
sudo service docker stop
2. Add a configuration file to tell the docker daemon what is the location of the data directory
Using your preferred text editor add a file named daemon.json
under the directory /etc/docker
.
sudo vim /etc/docker/daemon.json