dockerregistry推送本地主机上失败

我在我的本地主机上运行dockerregistry:5000,当我试图把图像得到下面的错误。

bash-4.2# docker push localhost:5000/test5 The push refers to a repository [localhost:5000/test5] (len: 1) Sending image list Put http://localhost:5000/v1/repositories/test5/: dial tcp 127.0.0.1:5000: connection refused 

以下是/ etc / default / docker中的条目

bash-4.2#more / etc / default / docker DOCKER_OPTS =“ – insecure-registry localhost:5000”

有人可以帮忙吗?