How to solve the problem that the Docker service cannot be started when the private warehouse is configured?

How to solve the problem that the Docker service cannot be started when the private warehouse is configured?

phenomenon

[root@localhost apache]# systemctl restart docker.service 
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

Solution

[root@localhost apache]# vim /etc/docker/daemon.json
{
    
    
  "insecure-registries":["20.0.0.51:5000"],
  "registry-mirrors": ["https://ix6qlzoo.mirror.aliyuncs.com"]
}
[root@localhost apache]# systemctl restart docker.service 

When configuring the path, don't forget the last comma, otherwise the service will not start, and you will not be able to find it if you are not careful.

Guess you like

Origin blog.csdn.net/m0_47219942/article/details/108698503