From 4cf73715212cd00d64a7dc323efe8f6150784c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Grodziski?= Date: Sat, 5 Nov 2016 18:47:08 +0000 Subject: [PATCH] --- docker-aliases.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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