Skip to content

Instantly share code, notes, and snippets.

@keithchambers
Created January 4, 2015 21:31
Show Gist options
  • Select an option

  • Save keithchambers/81f03136c6ed02b3c926 to your computer and use it in GitHub Desktop.

Select an option

Save keithchambers/81f03136c6ed02b3c926 to your computer and use it in GitHub Desktop.
Count docker containers in bash
docker ps | awk '$1 != "CONTAINER" { n++ }; END { print n+0 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment