Skip to content

Instantly share code, notes, and snippets.

@parkan
Last active August 29, 2015 14:25
Show Gist options
  • Select an option

  • Save parkan/78b206ea5ae6d7ed8eaa to your computer and use it in GitHub Desktop.

Select an option

Save parkan/78b206ea5ae6d7ed8eaa to your computer and use it in GitHub Desktop.
docker-compose aliases
b2d-shellinit(){
[ -z "$DOCKER_HOST" ] && $(boot2docker shellinit)
}
alias dc='b2d-shellinit; docker-compose'
alias dcr='b2d-shellinit; docker-compose run'
alias dcr-heroku='b2d-shellinit; docker-compose run `heroku config -a XXX-production | tail +2 | tr -s " " | sed -E "s/^([^ ]+): (.+)/-e \1=\2/" | tr "\\n" " "` api rails c'
alias dcr-heroku-staging='b2d-shellinit; docker-compose run `heroku config -a XXX-staging | tail +2 | tr -s " " | sed -E "s/^([^ ]+): (.+)/-e \1=\2/" | tr "\\n" " "` api rails c'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment