Enable docker search on private docker registry.

The cli interface works similar to other registry related commands:

  docker search foo

... searches for foo on the official hub

  docker search localhost:5000/foo

... does the same for the private reg at localhost:5000

Signed-off-by: Daniel Menet <membership@sontags.ch>
This commit is contained in:
Daniel Menet 2014-08-09 09:16:54 +02:00
parent 2ccfaf1484
commit d768343cbe

View File

@ -82,7 +82,11 @@ func (s *Service) Search(job *engine.Job) engine.Status {
job.GetenvJson("authConfig", authConfig)
job.GetenvJson("metaHeaders", metaHeaders)
r, err := NewRegistry(authConfig, HTTPRequestFactory(metaHeaders), IndexServerAddress(), true)
hostname, term, err := ResolveRepositoryName(term)
if err != nil {
return job.Error(err)
}
r, err := NewRegistry(authConfig, HTTPRequestFactory(metaHeaders), hostname, true)
if err != nil {
return job.Error(err)
}