问题
i want create private registry and follow this answer Setting up a remote private Docker registry docker run -p 5000:5000 registry and other servre modify /usr/lib/systemd/system/docker.service file to disable https
ExecStart=/usr/bin/dockerd --insecure-registry 172.24.54.41:5000
i can curl 172.24.54.41:5000 sudo service docker stop sudo systemctl daemon-reload sudo systemctl start docker the error log in systemctl status docker.service
docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: failed (Result: start-limit) since Mon 2017-12-11 16:52:23 CST; 6min ago Docs: https://docs.docker.com Process: 13300 ExecStart=/usr/bin/dockerd --insecure-registry 172.24.54.41:5000 (code=exited, status=1/FAILURE) Main PID: 13300 (code=exited, status=1/FAILURE)
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Failed to start Docker Application Container Engine. Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Unit docker.service entered failed state. Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service failed. Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service holdoff time over, scheduling restart. Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: start request repeated too quickly for docker.service Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Failed to start Docker Application Container Engine. Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Unit docker.service entered failed state. Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service failed.
how to solve it?
回答1:
It seems that the issue does not lie with your running of a registry but with your configuration of the docker service.
Could you link the content of your usr/lib/systemd/system/docker.service file?
来源:https://stackoverflow.com/questions/47750027/start-docker-error-when-add-insecure-registry