Guest User

Untitled

a guest
Aug 25th, 2019
59
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. if [ -z "$1" ]
  4. then
  5. exit 1
  6. else
  7. env="$1"
  8. fi
  9.  
  10.  
  11. if [ -e "docker-compose.$env.yml" ]
  12. then
  13. dc_file="docker-compose.$env.yml"
  14. else
  15. exit 1
  16. fi
  17.  
  18. docker-compose -f $dc_file ps --quiet | xargs docker stop | xargs docker rm
RAW Paste Data