I have a little problem. I have a brand new Red Hat Linux Server and I installed Docker CE for CentOS/Red Hat with the official repositories for Docker CE. Now I see that docker creates the container under /var/lib/docker. But, but my problem is that I use an extra partition for my data under /data/docker. How can I change the default root directory for Docker in CentOS/Red Hat?
I tried a few HowtosHOWTOs but I get the same problem. I can’t find the configuration. For example, I search for the following files:
- /etc/default/docker(I think only for Debian/Ubuntu)
- /etc/systemd/system/docker.service.d/override.conf(I cantcan't find on my system)
- /etc/docker/daemon.json(I cantcan't find on my system)
If I get the docker info I see:
 Docker Root Dir: /var/lib/docker
 
                