1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

'docker images' lists images in reverse creation order

This commit is contained in:
Solomon Hykes 2013-03-13 19:09:19 -07:00
parent c78cbbd002
commit a216712f3c

View file

@ -112,7 +112,7 @@ func (store *Store) Remove(img *Image) error {
func (store *Store) List(pth string) ([]*Image, error) {
pth = path.Clean(pth)
images, err := store.orm.Select(Image{}, "select images.* from images, paths where Path=? and paths.Image=images.Id", pth)
images, err := store.orm.Select(Image{}, "select images.* from images, paths where Path=? and paths.Image=images.Id order by images.Created desc", pth)
if err != nil {
return nil, err
}