Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
5 views
in DevOps and Agile by (2.3k points)

The official docker hub website has been moved from  https://hub.docker.com/ to https://registry.hub.docker.com.

I tried to pull a docker image using the docker pull command but it shows me this:

registry.hub.docker.com/busybox: this image was pulled from a legacy registry. Important: This registry version will not be supported in future versions of docker.

Instead, If I try to make use of this command:

$docker pull registry.hub.docker.com/busybox.

docker is not able to pull the image.

also same if i use:

 curl -k https://registry.hub.docker.com/v1/repositories/busybox/tags

3 Answers

0 votes
by (6.9k points)

If you want to pull any of the official images the registry path for them is library/<image>.

Try this:

$ docker pull registry.hub.docker.com/library/busybox

Hope that helped :)


Want to get better at using docker and docker hub try out docker training course.

0 votes
by (37.3k points)

The command required when you want to pull an image from DockerHub to your local machine is docker pull <image-name> and in your case, the command would be docker pull busybox.

The link provided in your case is incorrect, hence the 401 Gone error. 

The updated URL for the Docker registry is https://hub.docker.com/ and the link to access the busybox image tags would be https://hub.docker.com/_/busybox/tags.

0 votes
by (1.3k points)

Because you're using older Docker registry URL, a message displays, saying it is Legacy Registry. In modern versions of Docker, just use the image name for it is sufficient:

Code:

docker pull busybox

It is not necessary to include URLs like registry.hub.docker.com because Docker will default to Docker Hub. The full URL may not work due to the fact that Docker clients expect the default endpoint

Direct API calls must be noted that the endpoint structure has changed in newer versions. A best practice is to use Docker commands for compatibility with the latest registry setup and avoid issues.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Mar 20, 2020 in DevOps and Agile by chandra (29.3k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...