解决docker:pull access denied for hello-wrold, repository does not exist or may require 'docker login'.

在win 10上安装好Docker后,根据官方文档示例运行命令:docker run hello-world,报错:

C:\Users\stein>docker run hello-wrold
Unable to find image 'hello-wrold:latest' locally
docker: Error response from daemon: pull access denied for hello-wrold, repository does not exist or may require 'docker login'.

根据错误提示是:repository不存在或者需要运行docker login登录,但是根据官方文档:在docker hub中搜索或者拉去images时并不需要账户并且登录,如图1:

图1

于是,转而去配置repository,事实发现并没有卵用,只好google之,在Stackoverflow上的这个回答Docker hello-world: authentication error中可以找到一些线索:

图2

根据图2来看,还是需要使用账号和密码去登录的,不然也不会有那么多人问这个相关的问题;

于是乖乖的去创建Docker id,然后在运行docker run hello-world命令之前先使用命令docker login登录,过程如下:

 C:\Users\stein>docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to [https://hub.docker.com](https://hub.docker.com/) to create one.
Username: daoyi
Password:
Login Succeeded

C:\Users\stein>docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Pull complete
Digest: sha256:66ef312bbac49c39a89aa9bcc3cb4f3c9e7de3788c944158df3ee0176d32b751
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1\. The Docker client contacted the Docker daemon.
2\. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
3\. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
4\. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
[https://cloud.docker.com/](https://cloud.docker.com/)
For more examples and ideas, visit:
[https://docs.docker.com/engine/userguide/](https://docs.docker.com/engine/userguide/)
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,981评论 19 139
  • 最近研究了几天docker的快速部署,感觉很有新意,非常轻量级和方便,打算在公司推广一下,解放运维,省得每次部署一...
    Helen_Cat阅读 1,348评论 0 4
  • Q:按揭未还清的房子能否转手出售? A:不能 P:如果房产证出来了,所有的问题都好解决。房产证下来了,可以先挂牌到...
    戰敭阅读 197评论 0 0
  • Some days I barely hold on 有时,眼前的生活将我一点点拖垮When life drags...
    陈嘉育阅读 638评论 1 1
  • 比萨虽属面包的一个分支,但其作为主食的优越性使其逐渐成为一大品类,在中国的餐饮市场上独树一帜深受消费者喜爱。比萨在...
    xiaoke87fish阅读 414评论 0 0