mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
When doing a reverse-lookup of an image's tag, if the image has multiple tags, the first tag in alphabetical order will be used
This commit is contained in:
parent
8da1810975
commit
846a9e8963
1 changed files with 2 additions and 0 deletions
2
tags.go
2
tags.go
|
@ -6,6 +6,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -94,6 +95,7 @@ func (store *TagStore) ById() map[string][]string {
|
|||
byId[id] = []string{name}
|
||||
} else {
|
||||
byId[id] = append(byId[id], name)
|
||||
sort.Strings(byId[id])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue