How to filter docker ps by *exact* name?

Ah thanks. And docker ps | awk '{print $NF}' | grep -w foo to be safer in case one of the other columns matches (and removing Docker’s filtering which you don’t really need).

1 Like