从Docker容器安装Registry时遇到的问题

1、构建时出错:(命令和输出如下)

[root@ct ~]# docker run -p 5000:5000 registry:2

Unable to find image 'registry:2' locally
2: Pulling from library/registry
81033e7c1d6a: Pull complete
b235084c2315: Pull complete
c692f3a6894b: Pull complete
ba2177f3a70e: Pull complete
a8d793620947: Pull complete
Digest: sha256:feb40d14cd33e646b9985e2d6754ed66616fedb840226c4d917ef53d616dcd6c
Status: Downloaded newer image for registry:2
time="2018-03-29T03:25:33Z" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." go.version=go1.7.6 instance.id=5ddb630e-1852-4ee6-8103-e0f1c37796d1 version=v2.6.2
time="2018-03-29T03:25:33Z" level=info msg="redis not configured" go.version=go1.7.6 instance.id=5ddb630e-1852-4ee6-8103-e0f1c37796d1 version=v2.6.2
time="2018-03-29T03:25:33Z" level=info msg="using inmemory blob descriptor cache" go.version=go1.7.6 instance.id=5ddb630e-1852-4ee6-8103-e0f1c37796d1 version=v2.6.2
time="2018-03-29T03:25:33Z" level=info msg="listening on [::]:5000" go.version=go1.7.6 instance.id=5ddb630e-1852-4ee6-8103-e0f1c37796d1 version=v2.6.2
time="2018-03-29T03:25:33Z" level=info msg="Starting upload purge in 40m0s" go.version=go1.7.6 instance.id=5ddb630e-1852-4ee6-8103-e0f1c37796d1 version=v2.6.2

命令执行到这里就不往下执行了?


2、Push时出现错误:net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)



对于第一种错误:参考了(https://blog.csdn.net/chinagissoft/article/details/51863895)

然后看到其他博客上使用的命令:docker run -d -v /root/registry:/var/lib/registry -p 5000:5000 --restart=always --name registry registry:2.3.0  然后成功了。



你可能感兴趣的:(Docker)