Created
October 15, 2015 09:07
-
-
Save karellm/e38afd1bf23eeb4ad294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DOCKER | |
# ====== | |
if hash docker 2>/dev/null; then | |
alias dk="docker" | |
fi | |
dsa () { | |
docker stop $(docker ps -a -q) | |
} | |
dra () { | |
docker rm $(docker ps -a -q) | |
} | |
drmia () { | |
docker rmi $(docker images | grep '^<none>' | awk '{print $3}') | |
} | |
dkme () { | |
eval "$(docker-machine env default)" | |
} | |
if hash docker-machine 2>/dev/null; then | |
alias dkm="docker-machine" | |
alias dkmu="docker-machine start default" | |
alias dkmd="docker-machine stop default" | |
fi | |
if hash docker-compose 2>/dev/null; then | |
alias dkc="docker-compose" | |
alias dkcrails="docker-compose run app bundle exec rails $1" | |
alias dkcrake="docker-compose run app bundle exec rake $1" | |
alias dkcrspec="docker-compose run app bundle exec rspec -fd $1" | |
alias dkcreset="docker-compose run app bundle exec rake db:drop db:create db:migrate" | |
alias dkcresetdb="docker-compose run app bundle exec rake db:drop db:create db:migrate db:seed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment