I want to get status of docker containers with only names and status. I tried below but showing only status
sudo docker ps --format '{{.Names}}' --format '{{.Status}}'
Up 10 days (healthy)
With docker command could we get only container name and status
I want output similar like below,
container-Name | status
memcached | Up 10 days (healthy)
2
Answers
you can have it by running this:
This is the documentation on how to format
docker ps
You can use like this
Thanks @Root
Reference:
https://docs.docker.com/engine/reference/commandline/ps/