mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Implement the "library" repository endpoint on the registry
This commit is contained in:
parent
0d46ddf7b4
commit
5c04d3488a
1 changed files with 9 additions and 1 deletions
10
registry.go
10
registry.go
|
@ -164,7 +164,15 @@ func (graph *Graph) PullRepository(stdout io.Writer, remote, askedTag string, re
|
|||
|
||||
fmt.Fprintf(stdout, "Pulling repo: %s\n", REGISTRY_ENDPOINT+"/users/"+remote)
|
||||
|
||||
req, err := http.NewRequest("GET", REGISTRY_ENDPOINT+"/users/"+remote, nil)
|
||||
var repositoryTarget string
|
||||
// If we are asking for 'root' repository, lookup on the Library's registry
|
||||
if strings.Index(remote, "/") == -1 {
|
||||
repositoryTarget = REGISTRY_ENDPOINT + "/library/" + remote
|
||||
} else {
|
||||
repositoryTarget = REGISTRY_ENDPOINT + "/users/" + remote
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", repositoryTarget, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue