How to show the ID of the oldest running docker container?
I using docker
Docker version 1.3.2, build 50b8feb. There are some new filters for the
ps command, but it seems nothing provide what I need. I just want to see the oldest container running, to kill it, wait and kill the next oldest one. I hope somebody can come around with some bash magic I am not able to see at the moment. Thanks!
sort does not what I want since it also resorts before reverting order.
One Solution collect form web for “How to show the ID of the oldest running docker container?”
Oh yeah, captain obvious. I just needed to use
docker ps -aq | tail -n 1