Skip to content

Commit bcdf030

Browse files
samalbashin-
authored andcommitted
Fixed pulling repositories from library
1 parent a372f98 commit bcdf030

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

registry.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ func (graph *Graph) getRemoteImage(stdout io.Writer, imgId, registry string, tok
168168

169169
func (graph *Graph) getRemoteTags(stdout io.Writer, registries []string, repository string, token []string) (map[string]string, error) {
170170
client := graph.getHttpClient()
171+
if strings.Count(repository, "/") == 0 {
172+
// This will be removed once the Registry supports auto-resolution on
173+
// the "library" namespace
174+
repository = "library/" + repository
175+
}
171176
for _, host := range registries {
172177
endpoint := "https://" + host + "/v1/repositories/" + repository + "/tags"
173178
req, err := http.NewRequest("GET", endpoint, nil)
@@ -257,7 +262,7 @@ func (graph *Graph) PullImage(stdout io.Writer, imgId, registry string, token []
257262
func (graph *Graph) PullRepository(stdout io.Writer, remote, askedTag string, repositories *TagStore, authConfig *auth.AuthConfig) error {
258263
client := graph.getHttpClient()
259264

260-
fmt.Fprintf(stdout, "Pulling repository %s\r\n", remote)
265+
fmt.Fprintf(stdout, "Pulling repository %s from %s\r\n", remote, INDEX_ENDPOINT)
261266
repositoryTarget := INDEX_ENDPOINT + "/repositories/" + remote + "/images"
262267

263268
req, err := http.NewRequest("GET", repositoryTarget, nil)

0 commit comments

Comments
 (0)