I'm just getting started with docker. I'm following the instructions specified here https://docs.docker.com/windows/step_one/
I installed docker (1.10.2) on windows 10 & ran docker run hello-world
. But, I'm getting an authentication error while the tutorial doesn't mentioned anything about it.
Here's the message I received.
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Authentication is required: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
I searched google & here, but couldn't find anything similar to this error message.
Thanks!
Please run docker login
at first time when you run any other docker commands.
You can log into any public or private repository for which you have credentials. When you log in, the command stores encoded credentials in
$HOME/.docker/config.json
on Linux or%USERPROFILE%/.docker/config.json
on Windows.
Probably it can happen if you were logged in before, by console or by kitematic.
You can try docker logout
if you want use docker without auth.
In this case Authentication is required:
shouldn't appear again.
run docker login
to execute any other docker commands. or just logout if you want to use public hubs docker logout
On macOS you need to login from the commandline using
docker login
Also you must use your username and not your email
on ubuntu:
docker login
so if you don't know your username password, you probably haven't created one. what you should do, is go and create an id on docker visit: official docker webpage
just like any other github accout ,they will ask you for the username, provide one and they will authenticate same as github, once done , put your email and password. verify it and you are now good to go.
ok! now coming to the point... if you were facing the problem like the problem statement , just do
docker login
enter username and password, that you just provided . you will be displayed ,"LOGIN succeeded"
now run this command
docker run hello-world
beware of the dash '-' sign , i myself stuck with this issue, and you are done.
thanks:)
对于工作尝试docker logout
,然后使用正确的凭据docker login
For those who logged in via their email
address associated with their account during the Docker desktop installation process - this problem seems to occur because the terminal has also stored those credentials, but for some reason it only accepts login's via your actual username
.
If you go to DockerHub you should see it in the upper right corner.
Try running docker login
with that username, and you should be all set!
docker login
# username from dockerhub
# the same password
将我的docker dns服务器的vNAT设置为8.8.8.8解决了我在Windows上的问题,尝试可能会有所帮助,谢谢
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.