add docker volume aliases, stop xhost complaining on servers

This commit is contained in:
Frieder Schlesier 2016-11-15 17:30:35 +01:00
parent 93a51bb78a
commit 99e03c1c34
2 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,8 @@ alias camshot='fswebcam -r 640x480 --jpeg 90 -F 3 -D 1 --no-banner'
alias dps='docker ps -a' alias dps='docker ps -a'
alias di='docker images' alias di='docker images'
alias dv='docker volume '
alias dls='docker volume ls'
alias dip="docker inspect -f '{{ .NetworkSettings.IPAddress }}'" # call with <container name> or ID alias dip="docker inspect -f '{{ .NetworkSettings.IPAddress }}'" # call with <container name> or ID
alias dih="docker inspect -f '{{ .Config.Hostname }}'" # call with <container name> or ID alias dih="docker inspect -f '{{ .Config.Hostname }}'" # call with <container name> or ID
alias dstats="docker stats "'$(sudo docker ps -aq)' # shows stats thingy for all containers alias dstats="docker stats "'$(sudo docker ps -aq)' # shows stats thingy for all containers

View File

@ -13,12 +13,14 @@ esac
HISTCONTROL=ignoreboth HISTCONTROL=ignoreboth
# allow docker to use X # allow docker to use X
xhost +local:root if [ -f /usr/bin/xhost ]; then
xhost +local:root
fi
# Load the shell dotfiles, and then some: # Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`. # * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you dont want to commit. # * ~/.extra can be used for other settings you dont want to commit.
for file in ~/.{aliases,bash_prompt,functions,path,extra,exports,dockerfunc}; do for file in ~/.{aliases,bash_prompt,functions,path,dockerfunc,extra,exports}; do
[[ -r "$file" ]] && [[ -f "$file" ]] && source "$file" [[ -r "$file" ]] && [[ -f "$file" ]] && source "$file"
done done
unset file unset file