diff --git a/docker-aliases.sh b/docker-aliases.sh index ef8ae57..3521b24 100644 --- a/docker-aliases.sh +++ b/docker-aliases.sh @@ -21,6 +21,7 @@ # drmc : remove all exited containers # # drmid : remove all dangling images # # drun : execute a bash shell in NEW container from # +# dsr : stop then remove # # # ############################################################################ @@ -57,6 +58,10 @@ function drun-fn { docker run -it $1 /bin/bash } +function dsr-fn { + docker stop $1;docker rm $1 +} + alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dex=dex-fn @@ -69,4 +74,5 @@ alias dps="docker ps" alias dpsa="docker ps -a" alias drmc="docker rm $(docker ps --all -q -f status=exited)" alias drmid="docker rmi $( docker images -q -f dangling=true)" -alias drun=drun-fn \ No newline at end of file +alias drun=drun-fn +alias dsr=dsr-fn \ No newline at end of file