Last active
November 17, 2015 09:06
-
-
Save scarhand/ca1f78576c1b8b0c8cb9 to your computer and use it in GitHub Desktop.
Docker aliases
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 aliases | |
alias dps='docker ps' | |
alias dpsa='docker ps -a' | |
alias diip='docker inspect --format "{{ .NetworkSettings.IPAddress }}"' | |
alias dstats='docker stats $(docker inspect --format="{{ .Name }}" `docker ps -q`)' | |
alias druby='docker run -it --rm --entrypoint=/bin/bash scarhand/vim-ruby' | |
alias dclean='docker rmi $(docker images | grep "^<none>" | awk "{print $3}")' | |
function dex { | |
if [ -z "$2" ]; then | |
PROGRAM=bash | |
else | |
PROGRAM=$2 | |
fi | |
docker exec -t -i $1 $PROGRAM | |
} | |
dex=dex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment