start docker error when add --insecure-registry

邮差的信 提交于 2019-12-11 14:13:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!