Fix dklcip alias

Due to use of double-quotes ``docker ps`` was executed when the aliases
were loaded and as a consequence ``dklcip`` would always show IP of a
container that was last then instead of at runtime.

This changes the alias to use single quotes which fixes that.

It also changes the alias to use docker's ``--format`` option so
there's no need of parsing the output using grep and cut.
pull/506/head
jitakirin 2015-06-17 15:26:06 +01:00
parent 94ffef8cf7
commit b8011d1534
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ about-alias 'docker abbreviations'
alias dklc='docker ps -l' # List last Docker container alias dklc='docker ps -l' # List last Docker container
alias dklcid='docker ps -l -q' # List last Docker container ID alias dklcid='docker ps -l -q' # List last Docker container ID
alias dklcip="docker inspect `docker ps -l -q` | grep IPAddress | cut -d '\"' -f 4" # Get IP of last Docker container alias dklcip='docker inspect -f "{{.NetworkSettings.IPAddress}}" $(docker ps -l -q)' # Get IP of last Docker container
alias dkps='docker ps' # List running Docker containers alias dkps='docker ps' # List running Docker containers
alias dkpsa='docker ps -a' # List all Docker containers alias dkpsa='docker ps -a' # List all Docker containers
alias dki='docker images' # List Docker images alias dki='docker images' # List Docker images