Get Docker Container Names

corey picture corey · Aug 8, 2015 · Viewed 56.9k times · Source

This command gives me a list of running container IDs:

docker ps -q

Is there a command to get the list of names of the containers?

Answer

cleong picture cleong · Mar 2, 2017

docker ps --format "{{.Names}}"