Docker 登录命令不起作用

标签 docker boot2docker dockerfile dockerhub docker-registry

我已经在我的 Windows 机器上安装了 boot2docker,并在 docker hub 上创建了一个存储库。我尝试在 linux shell 中使用以下命令登录:

docker login --username=myusername --password=mypassword --email=myemail@gmail.com

但是我在 shell 中得到了这个:

enter image description here

出现密码字段,要求我输入密码,但是当我输入密码并按 Enter 键时,没有任何反应。

想法?

最佳答案

2016 年 2 月更新

PR 19891 "Enable cross-platforms login to Registry"应该可以解决这个问题

Use a daemon-defined Registry URL for docker login.

This allows a Windows client interacting with a Linux daemon to properly use the default Registry endpoint instead of the Windows specific one.

位于 commit 19eaa71 (也许适用于 docker 1.10?)

<小时/>

tyagian报告following solutionissue 18019 :

Open the config json file: C:\Users\Username\.docker\config.json

It will look like this:

{
  "auths": {
    "https://index.docker.io/v1/": {
      "auth": "<hash value>",
      "email": "<email-address>"
    }
  }
}

将其更改为:

{
  "auths": {
    "https://index.docker.io/v1/": {
      "auth": "<hash value>",
      "email": "<email-d>"
    },
    "https://registry-win-tp3.docker.io/v1/": {
      "auth": "<hash value>",
      "email": "<email-address>"
    }
  }
}

and then try again:

$ docker push username/image-name

关于Docker 登录命令不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31863637/

相关文章:

tomcat - 使用 Docker-compose 将文件复制到 Docker 容器中的 tomcat webapps 文件夹

azure - 是否可以在本地运行 Azure 逻辑应用

node.js - 在 Docker 容器内或外部运行 Grunt/Gulp?

macos - 我的 boot2docker 安装似乎无法正常工作。我究竟做错了什么?

nginx - Docker的容器挂载文件夹

docker - 为redis主机配置docker容器ip

docker推送到私有(private)注册表: how not to specify a port

python - 在azure上使用docker镜像部署python web应用程序

macos - docker 未在OSX上打开端口

docker - 使用 boot2docker 将 docker 容器应用程序端口公开到 Windows 上的主机