Created
October 15, 2015 09:07
Revisions
-
karellm created this gist
Oct 15, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ # 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