summaryrefslogtreecommitdiff
path: root/libpod/sql_state.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-22 12:21:53 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-22 18:12:57 +0000
commit34ba0cb8a922347364afaa14f199409ad7dc2451 (patch)
tree23fa7811dcf3de1501399f76373dc13bf4744d64 /libpod/sql_state.go
parentbd4e106de3d890bd2b0520083c9ad7d314b61487 (diff)
downloadpodman-34ba0cb8a922347364afaa14f199409ad7dc2451.tar.gz
podman-34ba0cb8a922347364afaa14f199409ad7dc2451.tar.bz2
podman-34ba0cb8a922347364afaa14f199409ad7dc2451.zip
Order containers returned from state and make container config public
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #63 Approved by: baude
Diffstat (limited to 'libpod/sql_state.go')
-rw-r--r--libpod/sql_state.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/sql_state.go b/libpod/sql_state.go
index 893223914..8b18a8959 100644
--- a/libpod/sql_state.go
+++ b/libpod/sql_state.go
@@ -544,7 +544,8 @@ func (s *SQLState) AllContainers() ([]*Container, error) {
containerState.Pid
FROM containers
INNER JOIN
- containerState ON containers.Id = containerState.Id;`
+ containerState ON containers.Id = containerState.Id
+ ORDER BY containers.CreatedTime DESC;`
if !s.valid {
return nil, ErrDBClosed