Many Linux users did not allocate the /var partition when they installed the system. After installing Docker, it was found that its default location is in /var/lib/docker. So it caused Docker to run very slowly, so how to solve this problem? Let's take a look at the solution.
Solution:
First, reinstall the system, which is too humane, ignored. . . The next time you deploy the Docker host, you have to partition it.
The second is to change the default storage path for Docker.
Check the manual to find: -g, --graph=“/var/lib/docker” Set the Docker runtime root directory
Use the --graph parameter: docker --graph =/opt/docker -d, will automatically generate /opt/docker directory (0700), and create docker related files in this directory
The original image and container can not be found, because the path is changed ( The original image is in /var/lib/docker/devicemapper/devicemapper/{data,metadata})
Docker's configuration file can set most of the background process parameters, which are inconsistent in each operating system.
The location in ubuntu is: /etc/default/docker
The location in centos is: /etc/sysconfig/docker
I am using CentOS 7, so Just change vim /etc/sysconfig/docker to
OPTIONS=--graph=“/home/lib/docker” --selinux-enabled -H fd://
Then Service docker start The path to restart Docker is changed to /home/lib/docker.
The above is the solution. Space Docker storage location is too small, resulting in a slow way to run a Docker, users have encountered this problem, resolve it in this way.
Sometimes we want to log in to SSH through another account, usually we need to re-enter the password
The Linux system process is composed of threads. Of course, the number of threads u
Rescue mode, as its name suggests, is to maintain the Linux system mode. When the /
The find command is mainly used for file search. It has been described in detail in the previous art
Ubuntu installs AMD proprietary driver steps
How to modify the app icon icon under Ubuntu Gnome
Solve the problem of installing Linux prompt Boot Efi does not have space to set up
What should I do if the Fedora 18 DNSenum shows IP garbled?
How Linux system analyzes Cache in memory
How to install and upgrade VMware Tools in Fedora
How to modify the default timeout time of sudo in Ubuntu system?
How to implement ioctl function in Linux system?
Linux system uses FTP method by command
What are the usages of the ls command in Linux operations?
Linux how to set up git to share with svn
Linux system how to use the mount command and software to mount the ISO file
How does win7 change the local disk into the name you want
Windows 8 flexible split screen snap function
How to create a storage pool in Windows 8?
Microsoft's latest patch or black screen such as XP/Windows7
What should I do if the Win10 system cannot be activated after upgrading to the 10586 version?
Win8 uninstall system search function tips
Analysis and solution to the problem that U disk cannot be formatted under Win8 system
Implementing parent and child domains in DNS, as well as authorization and forwarding
Reinstall win7 system boot has been stuck in the self-test interface can not go to how to solve