Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker ps -a sort by date

Tags:

docker

docker ps sorts by time, but the most recent docker instance is at the very top. This means if you started very many instances you have to scroll all the way to the top to see them. How do we output "docker ps -a" in reverse order, so that the most recent instance is printed at the bottom?

like image 846
user3180 Avatar asked Sep 12 '26 01:09

user3180


1 Answers

Latest created container:

docker ps -a -l

Latest 5 created containers:

docker ps -a -n 5

As far as I know ordering is not possible but maybe you don't really need it...

like image 54
Mihai Avatar answered Sep 14 '26 20:09

Mihai