how to get container name code example
Example 1: docker ps only show names
docker ps --format '{{.Names}}'
Example 2: list stopped containers
docker ps --filter "status=exited"
docker ps --format '{{.Names}}'
docker ps --filter "status=exited"