在Fedora 25中“https://hub.docker.com/v2/login尝试失败,状态:404 Not Found”

我在Fedora 25中安装了Docker CE。

当我尝试使用以下命令login到docker hub时,出现错误。

$ docker login --username xxx --password yyy https://hub.docker.com/ WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: login attempt to https://hub.docker.com/v2/ failed with status: 404 Not Found $ docker --version Docker version 17.07.0-ce, build 8784753 $ docker-machine --version docker-machine version 0.12.2, build 9371605 

请注意,在Ubuntu 16.04中,相同的命令工作正常。唯一不同的是我能想到的是Ubuntu有docker和fedora有docker-ce。

不知道为什么我只在Fedora上出现这个错误。 当Fedora安装在虚拟机器虚拟机上时,我得到这个错误。

当它是hub.docker.com时,您不需要指定registry。

 docker login --username xxx --password yyy 

使用上面的命令没有URL,它应该工作

您可以使用Tarun提到的上述命令,或者仅使用缩写参数将命令与-u用于USername, -p用于Password。

这里是dockerlogin的基本屏幕截图

在这里输入图像说明

正如无法login到docker hub 所述,registry只能实现V1(或者还没有configuration为使用V2规范,在这种情况下,守护进程必须configuration为支持旧版registry

你可以使用“docker info”命令来validation:

 docker info ... Server Version: 17.09.0-ce Operating System: Ubuntu 16.04.3 LTS ... Registry: https://index.docker.io/v1/ 

因此,它失败了…

 docker login --username my_login --password my_password WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password