Docker: " login attempt to https://hub.docker.com/v2/ failed with status: 404 Not Found" in Fedora 25 Docker: " login attempt to https://hub.docker.com/v2/ failed with status: 404 Not Found" in Fedora 25 docker docker

Docker: " login attempt to https://hub.docker.com/v2/ failed with status: 404 Not Found" in Fedora 25


You need not specify the registry when it is hub.docker.com.

docker login --username xxx --password yyy

Use above command without URL and it should work


I had a similar issue when setting up a Jenkins pipeline for a Docker application.

The issue was that I was in my Jenkinsfile build stage I was using https://hub.docker.com as the registry for Docker:

stage('Push image') {  /* Finally, we'll push the image with two tags:  * First, the incremental build number from Jenkins  * Second, the 'latest' tag.  * Pushing multiple tags is cheap, as all the layers are reused. */  docker.withRegistry('https://hub.docker.com', 'Dockerhub') {    app.push("${env.BUILD_NUMBER}")    app.push("latest")  }}

Here's how I fixed it:

I simply had to modify the docker registry from https://hub.docker.com to https://registry.hub.docker.com:

stage('Push image') {  /* Finally, we'll push the image with two tags:  * First, the incremental build number from Jenkins  * Second, the 'latest' tag.  * Pushing multiple tags is cheap, as all the layers are reused. */  docker.withRegistry('https://registry.hub.docker.com', 'Dockerhub') {    app.push("${env.BUILD_NUMBER}")    app.push("latest")  }}

And then for my Dockerhub credentials in Jenkins Configuration:

username: my_username (not my email address)password: my_password

That's all.

I hope this helps.


Docker Hub is the default registry, so there's no need to specify the registry (i.e., just docker login --username .... is sufficient).

However, the reason you're getting this error, is because hub.docker.com is the domain of the Docker Hub website, not the registry backing Docker Hub; the registry is located at index.docker.io, (e.g. docker login index.docker.io).

In short, run command like below

PS D:> docker loginLogin 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 to create one.Username: Password: Login SucceededPS D:>