
In order to run all the various services in docker containers, Docker must first be installed. It is an easy process. The only specific configuration is to move the location of the docker storage to the /data folder instead of the default one (/var/lib/docker).
Install docker
The installation procedure is well documented by docker on their website. Just follow the steps to install docker.
Change the docker file location
To change the location where docker manages its file, edit or create the /etc/docker/daemon.json file. Add the following content:
{
"graph": "/data/docker"
}
/data/docker is the folder where I want docker to manage its files.
Restart the service with sudo systemctl restart docker to make the change effective.
It’s that simple, docker is now running and configured for our server, ready to deploy containers.