Skip to content

Instantly share code, notes, and snippets.

@maxcnunes
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxcnunes/49d890732b31a5c00962 to your computer and use it in GitHub Desktop.
Save maxcnunes/49d890732b31a5c00962 to your computer and use it in GitHub Desktop.
# remove all trash images
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
# or
docker rmi $(docker images -q -f dangling=true)
# stop all projects by name
docker stop $(docker ps | grep "container_name" | awk '{print $1}')
# get public port by private port and container name
docker port container_name_or_id 27017 | awk -F':' '{print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment