Docker Community Forums

Share and learn in the Docker community.

How to Search Docker Hub Private Repository


(Jorgerodsg) #1

Hi,

I se up a private repository in Docker Hub and pushed some images with their associated tags. I want to be able to query/ search the repository to get back all the images currently in the repository without downloading them, just having them listed.

Once I get the list I will download just one of them with docker pull.

I know search can be done in public repositories, however, I’d like to do his for my private Docker Hub repository.


(Gary Forghetti) #2

Check out these bash functions -> Docker Registry API Bash Functions

Example to list all tags from a docker repository for the repository gforghetti/apache

Note: the repository can be in Docker Hub or in a private registry.
You will need to be logged to Docker Hub for a private repository by issuing a docker login command.
You will need to be logged into the private registry for repositories in a private registry.

🐳  gforghetti:[~] $ get_docker_repo_tags -r gforghetti/apache | jq -r '.tags[]'
1.0.1
1.0.2
1.1.2
2.0
latest-layered
latest