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 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 HOWTOs 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 can't find on my system)/etc/docker/daemon.json
(I can't find on my system)
If I get the docker info I see:
Docker Root Dir: /var/lib/docker