SHARE
TWEET

Untitled

a guest Apr 21st, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. CONTAINERS="$HOME/docker/containers"
  4. DEFAULT="dev"
  5.  
  6. run_container() {
  7.     name=$1
  8.     name=${name:=$DEFAULT}
  9.  
  10.     if [ -d "$CONTAINERS/$name" ]; then
  11.         cd "$CONTAINERS/$name" && docker-compose up
  12.     else
  13.         echo "Failed to find container"
  14.     fi
  15. }
  16.  
  17. run_container "$@"
RAW Paste Data
Top