Skip to content

Instantly share code, notes, and snippets.

@marklabrecque
Created July 10, 2017 15:26
Show Gist options
  • Save marklabrecque/8f02a4921806f0bac7bfe535053d75ae to your computer and use it in GitHub Desktop.
Save marklabrecque/8f02a4921806f0bac7bfe535053d75ae to your computer and use it in GitHub Desktop.
Global docker management script (hardcoded repo PATH)
function shipyard() {
# default is 'down' if no parameter is supplied
if [ -z "$1" ]
then
docker-kill-all
else
if [[ $1 == "down" ]]
then
docker-kill-all
fi
if [[ $1 == "up" ]]
then
cd ~/shipyard
docker-compose up -d
fi
if [[ $1 == "restart" ]]
then
docker-kill-all
docker-compose up -d
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment