cancel
Showing results for 
Search instead for 
Did you mean: 
jrb21701
Cadet
Cadet
  • 5,566 Views

Podman search

Jump to solution

When I test podman search in the Red Hat training subscription the only thing that shows results is "ubi"

How do I search a registry? It does not seem to work in the training. I recieved  a 0% in containers  section on a EX200 exam because I was not able to get the exact path in the registry.

Training support was not able to help me.

John

  

Labels (1)
1 Solution

Accepted Solutions
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 5,477 Views

Well... /etc/containers/registries.conf should contain a list of registries that you are using.

1.JPG

It is possible that ~/.config/containers/storage.conf may be used (on a per user basis, hence the ~):

Then, for many registries, you need to be logged in:

podman login <registry_name>

(Note, the -u option can be used to supply the username and the -p can supply the password. If this information is not supplied on the command line, it will be asked for.)

Then you should be able to search all of the configured registries...

podman search <search_string>

2.JPG

...or within a specific registry

podman search <registry_name/search_string>

3.JPG

 

I cannot speak directly to anything on a cert. exam as that would violate the NDA. I can say that all the information that you'll need to do what needs to be done will be provided. It is up to you to properly use that information.

 

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College

View solution in original post

4 Replies
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 5,478 Views

Well... /etc/containers/registries.conf should contain a list of registries that you are using.

1.JPG

It is possible that ~/.config/containers/storage.conf may be used (on a per user basis, hence the ~):

Then, for many registries, you need to be logged in:

podman login <registry_name>

(Note, the -u option can be used to supply the username and the -p can supply the password. If this information is not supplied on the command line, it will be asked for.)

Then you should be able to search all of the configured registries...

podman search <search_string>

2.JPG

...or within a specific registry

podman search <registry_name/search_string>

3.JPG

 

I cannot speak directly to anything on a cert. exam as that would violate the NDA. I can say that all the information that you'll need to do what needs to be done will be provided. It is up to you to properly use that information.

 

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
jrb21701
Cadet
Cadet
  • 5,462 Views

Thanks this is great information. The screen shots really help to clarify the question. I am not able to use this method of search within the Red Hat Learning subscription labs. I hope it works on the exam.

John

 

 

 

0 Kudos
  • 3,339 Views

I know that this is a couple years late but I was just having the same issue -- for anyone else scouring for WHY search isn't working in the labs, this solution may work for you.

After configuring the unqualified registry, I was attempting to search within it:

SB_Aldrich_0-1681777473647.png

As you can see, no result. BUT if you add a forward slash.......:

SB_Aldrich_1-1681777530818.png


I spent a lot of time trying to figure this out so hopefully it may help others having the same issue.



flozano
Moderator
Moderator
  • 5,424 Views

Hi,

RH134 uses a private registry, that's internal to the classroom environment, and I'm not sure if it has access to the internet or not, nor about its registry search path, so the results from the classroom environment might be very different than results from you local machine connected to the internet.

The examples from Tracy would work outside of the classroom environment and the classroom only provides a very small set of container images.

Anyway be warned that podman search (and docker search, for that matter) are very unreliable and shouldn't be trusted as a way of discovering container images. You should use the web front-end from a public registry, such as quay.io, or the Red Hat Container Catalog at https://catalog.redhat.com/software/containers/explore/

The reason why CLI search for containers is unreliable is that, since the registry API v2 (a loooong time ago), there's no "search" operation, as it existed in the deprecated (and by many reasons broken) v1 API.

CLI tools use the catalog API to emulate searches, but the catalog API is not guaranteed to return all results. Registry servers are at liberty to truncate catalog results any way they like and clients have no control over this. So you could search for the exact name of a container that you know for a fact that it exists in a registry server and still do not get it in the search results.

Join the discussion
You must log in to join this conversation.