Skip to content

Commit

Permalink
aded docker count alias
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdalert committed Apr 11, 2016
1 parent 7802b40 commit 4a60f7c
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions bash_profile_docker_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,7 @@ alias dri='docker rmi '
alias dr='docker rm -f '
alias dls='docker ps -a '
alias dlsl='docker ps -l '
alias dac='sudo docker attach '

# Docker inspect the last container created
alias dinl='docker inspect $(docker ps -qal)'
# Docker inspect all containers
alias dina='docker inspect $(docker ps -qa)'

# Delete all containers matching the passed paramater
# Example: "delcon ubuntu" or 'anything matching in docker ps output'
delcon() { docker rm -f $(docker ps -a | grep $@ | awk '{print $1}') ;}

# Stop all containers matching the passed paramater.
stopcon() { docker stop $(docker ps -a | grep $@ | awk '{print $1}') ;}
alias da='sudo docker attach --sig-proxy=false '
alias dcount='docker ps -qa | wc -l'
alias dtop='docker stop '
alias start='docker start $(docker ps -qa)'
alias din='docker inspect '
Expand All @@ -82,6 +69,18 @@ alias dlog='docker logs $(docker ps -l -q)'
alias drun='docker run -i -t -name '
alias dport='docker port $(docker ps -l -q)'

# Docker inspect the last container created
alias dinl='docker inspect $(docker ps -qal)'
# Docker inspect all containers
alias dina='docker inspect $(docker ps -qa)'

# Delete all containers matching the passed paramater
# Example: "delcon ubuntu" or 'anything matching in docker ps output'
delcon() { docker rm -f $(docker ps -a | grep $@ | awk '{print $1}') ;}

# Stop all containers matching the passed paramater.
stopcon() { docker stop $(docker ps -a | grep $@ | awk '{print $1}') ;}

# On demand foreground OS bash shells that delete on shell exit
alias alpinerm='docker run -it --rm alpine /bin/sh'
alias ubunturm='docker run -it --rm ubuntu'
Expand Down

0 comments on commit 4a60f7c

Please sign in to comment.