Skip to main content
edited body; edited tags
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

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

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 cant find on my system)
  • /etc/docker/daemon.json (I cant find on my system)

If I get the docker info I see:

Docker Root Dir: /var/lib/docker

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

spelling, punctuation and formatting
Source Link
Anthony Geoghegan
  • 13.6k
  • 7
  • 62
  • 66

Change Docker Root Dir on RedHatRed Hat Linux?

iI have a little problem. I have a brandnew RedHatbrand new Red Hat Linux Server and iI installed Docker CE for CentosCentOS/RedhatRed Hat with the official Repositoriesrepositories for DockerCEDocker CE. Now iI see that docker createcreates the container under /var/lib/docker/var/lib/docker. But my problem areis that iI use an extra partition for my data under /data/docker how i/data/docker. How can I change the defaulddefault root dirdirectory for dockerDocker in CentosCentOS/Redhat Red Hat?

I trytried a few Howtos but i alreadyI get the same problem i cant. I can’t find the Config forconfiguration. For example i, I search for the following files  :

/etc/default/docker (I think only for Debian/Ubunntu)

/etc/systemd/system/docker.service.d/override.conf (I cant find on my system)

/etc/docker/daemon.json (I cant find on my system)

  • /etc/default/docker (I think only for Debian/Ubuntu)
  • /etc/systemd/system/docker.service.d/override.conf (I cant find on my system)
  • /etc/docker/daemon.json (I cant find on my system)

If iI get the docker info iI see  :

Docker Root Dir: /var/lib/docker/var/lib/docker

Change Docker Root Dir on RedHat Linux?

i have a little problem. I have a brandnew RedHat Linux Server and i installed Docker CE for Centos/Redhat with the official Repositories for DockerCE. Now i see that docker create the container under /var/lib/docker. But my problem are that i use an extra partition for my data under /data/docker how i can change the defauld root dir for docker in Centos/Redhat ?

I try a few Howtos but i already get the same problem i cant find the Config for example i search for the following files  :

/etc/default/docker (I think only for Debian/Ubunntu)

/etc/systemd/system/docker.service.d/override.conf (I cant find on my system)

/etc/docker/daemon.json (I cant find on my system)

If i get the docker info i see  :

Docker Root Dir: /var/lib/docker

Change Docker Root Dir on Red Hat Linux?

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 cant find on my system)
  • /etc/docker/daemon.json (I cant find on my system)

If I get the docker info I see:

Docker Root Dir: /var/lib/docker

Source Link
M. Max
  • 103
  • 1
  • 1
  • 4

Change Docker Root Dir on RedHat Linux?

i have a little problem. I have a brandnew RedHat Linux Server and i installed Docker CE for Centos/Redhat with the official Repositories for DockerCE. Now i see that docker create the container under /var/lib/docker. But my problem are that i use an extra partition for my data under /data/docker how i can change the defauld root dir for docker in Centos/Redhat ?

I try a few Howtos but i already get the same problem i cant find the Config for example i search for the following files :

/etc/default/docker (I think only for Debian/Ubunntu)

/etc/systemd/system/docker.service.d/override.conf (I cant find on my system)

/etc/docker/daemon.json (I cant find on my system)

If i get the docker info i see :

Docker Root Dir: /var/lib/docker