//Stop the Idocker service
systemctl stop docker.socket
systemctl stop docker
//Mount the network share
sudo mount 192.168.50.30:/test /raid
//automatically mount at startup
vim /etc/fstab
192.168.50.30:/test /share nfs
//Modify the docker image diary
vim /etc/docker/daemon. json
{
“bip”: “128.128.0.1/16”,
“insecure-registries”: [“192.168.50.23:11010”],
“data-root”: “/raid/docker”
}
//Start docker and report an error:
docker.socket: Failed with result 'service start limit-hit'.
As a solution, the overlay2 journal must
be empty. Here is an important point to explain that when the docker service cannot be started, use journalctl -xe to view the service log.
'service start limit-hit'. Different error codes have different solutions.
My requirement here is that the disk capacity of the host is too small, and it must be mounted to the specified shared directory. If it is not modified to the specified directory, it can be started normally, but it will not work if the directory is modified. Deleting overlay2 is one way.
//Modify the interface service of docker
vim /lib/systemd/system/docker.service
ExecStart-/usr/bin/dockerd H fd://–containerd=/run/containerd/containerd.sock -H 0.0.0.0:2375
//Start docker
systemctl daemon-reload
systemctl restart docker