Merge pull request #16509 from HuKeping/search-problem
Fix docker search problem
This commit is contained in:
commit
60edb40c29
2 changed files with 27 additions and 6 deletions
|
@ -54,7 +54,8 @@ func (s *Service) Auth(authConfig *cliconfig.AuthConfig) (string, error) {
|
|||
// Search queries the public registry for images matching the specified
|
||||
// search terms, and returns the results.
|
||||
func (s *Service) Search(term string, authConfig *cliconfig.AuthConfig, headers map[string][]string) (*SearchResults, error) {
|
||||
repoInfo, err := s.ResolveRepository(term)
|
||||
|
||||
repoInfo, err := s.ResolveRepositoryBySearch(term)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -75,7 +76,13 @@ func (s *Service) Search(term string, authConfig *cliconfig.AuthConfig, headers
|
|||
// ResolveRepository splits a repository name into its components
|
||||
// and configuration of the associated registry.
|
||||
func (s *Service) ResolveRepository(name string) (*RepositoryInfo, error) {
|
||||
return s.Config.NewRepositoryInfo(name)
|
||||
return s.Config.NewRepositoryInfo(name, false)
|
||||
}
|
||||
|
||||
// ResolveRepositoryBySearch splits a repository name into its components
|
||||
// and configuration of the associated registry.
|
||||
func (s *Service) ResolveRepositoryBySearch(name string) (*RepositoryInfo, error) {
|
||||
return s.Config.NewRepositoryInfo(name, true)
|
||||
}
|
||||
|
||||
// ResolveIndex takes indexName and returns index info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue