forked from TrueCloudLab/distribution
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:
parent
94ff3f3e4d
commit
744919be3d
1 changed files with 8 additions and 0 deletions
|
@ -82,6 +82,14 @@ func (s *Service) Search(job *engine.Job) engine.Status {
|
||||||
job.GetenvJson("authConfig", authConfig)
|
job.GetenvJson("authConfig", authConfig)
|
||||||
job.GetenvJson("metaHeaders", metaHeaders)
|
job.GetenvJson("metaHeaders", metaHeaders)
|
||||||
|
|
||||||
|
hostname, term, err := ResolveRepositoryName(term)
|
||||||
|
if err != nil {
|
||||||
|
return job.Error(err)
|
||||||
|
}
|
||||||
|
hostname, err = ExpandAndVerifyRegistryUrl(hostname)
|
||||||
|
if err != nil {
|
||||||
|
return job.Error(err)
|
||||||
|
}
|
||||||
r, err := NewSession(authConfig, HTTPRequestFactory(metaHeaders), IndexServerAddress(), true)
|
r, err := NewSession(authConfig, HTTPRequestFactory(metaHeaders), IndexServerAddress(), true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return job.Error(err)
|
return job.Error(err)
|
||||||
|
|
Loading…
Reference in a new issue