docker push到本地仓库失败
开启registry的方法:
docker run -d -p 5000:5000 -v /data/registry:/tmp/registry registry
出错内容:
Error: Status 500 trying to push repository mongodb:
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n
<title>500 Internal Server Error</title>\n
<h1>Internal Server Error</h1>\n
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n"
但是却可以读:
[root@centos-docker ~]# docker search 172.20.1.13:5000 INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
解决办法:
1.selinux模式为permissive模式 setenforce 0
2.容器启动,添加--privileged=true