api: Move Repo(Digests|Tags) <none> fallback from daemon
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
432390c4c4
commit
2f9e3cca3d
2 changed files with 7 additions and 2 deletions
|
@ -337,6 +337,13 @@ func (ir *imageRouter) getImagesJSON(ctx context.Context, w http.ResponseWriter,
|
|||
return err
|
||||
}
|
||||
|
||||
for _, img := range images {
|
||||
if len(img.RepoTags) == 0 && len(img.RepoDigests) == 0 {
|
||||
img.RepoTags = append(img.RepoTags, "<none>:<none>")
|
||||
img.RepoDigests = append(img.RepoDigests, "<none>@<none>")
|
||||
}
|
||||
}
|
||||
|
||||
return httputils.WriteJSON(w, http.StatusOK, images)
|
||||
}
|
||||
|
||||
|
|
|
@ -178,8 +178,6 @@ func (i *ImageService) Images(ctx context.Context, opts types.ImageListOptions)
|
|||
if opts.Filters.Contains("reference") { // skip images with no references if filtering by reference
|
||||
continue
|
||||
}
|
||||
summary.RepoDigests = []string{"<none>@<none>"}
|
||||
summary.RepoTags = []string{"<none>:<none>"}
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue