Frequently asked questions about docker

FAQ: 1, Cannot connect to the Docker daemon. Is the Docker daemon running on this host?Solution: This is the most common problem with docker when it’s first installed. There are two standard ways to solve this problem: A, start the Docker background service with root authority, and Service Docker Start. B, or add the current user to the Docker group. Apart from these two reasons, Docker daemon could not start, but more because the system boot time was wrong. Because the Gentoo kernel is self-defined, the majority of error reporting may be caused by parameter configuration in the kernel. Check /var/log/docker.log for any errors.
Error starting Daemon: Devices CGroup isn’t mounted in the kernel of Gentoo. It is required to open the cGroup, such as memory CFS RT, etc. For the BLkio error of cGroup, it needs to be turned on through the Settings inside the block.
3, Can’t Initialize iptables table ‘NAT ‘: Table does not Exist solution: Because iptables is the dependent component required to run for Docker (security Settings are required), it is crucial to set up the iptable correctly. If NAT is wrong when Docker starts, there are usually two reasons. The first reason is that iptables is not set correctly, and the second reason is the kernel setting. The standard iptables setup sequence is as follows: Iptables -F Service IPtables Save Service Iptables Restart has Gentoo installed and configured properly and should theoretically have an IPtable and NAT side. If the IPtables or NAT Settings are not correct, there is a problem with the kernel configuration. In kernel configuration, to activate IPtable and NAT, it is necessary to open netFilter and all the following functions in the network. Otherwise, at runtime, you’ll get all sorts of weird bugs. After the compilation core is restarted, the problem is resolved.
4, Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and F ilesystem verification failed: devicemapper: Error running deviceCreate (ActivateDevice) dm_task_run failed, fault analysis, the causes of the failure of several, one is the docker storage space is full, the new add or modify the container will be an Error, another reason is more direct,/var/log/docker/under the devicemapper data and metadata file is deleted. But the bottom line is that the uUID of the existing Storage-set is inconsistent with the UUID saved in the Docker configuration. Solution: The solution to this problem is simple and brutal. Clean all the configuration files of Docker directly (all the existing data will be lost), restart the service, and let Docker rebuild automatically. rm -rf /var/lib/docker/* service docker restart
 
Copyright belongs to the author. Please contact the author for any reprint.
the author: keenshoes (from douban)
source: https://www.douban.com/note/636127425/

Read More: