Docker Community Forums

Share and learn in the Docker community.

Docker PS display container name in required format

Hi,
I am doing docker ps command.
docker ps --format “table t{{.Names}}” . I need to trim the output Name column and display .
Eg. Name
abc-container1-id
abcd-container2-id
abcdfg-container3-id

needed output - Name
Container1
Container2
Conainter3
Any help would be good.