diff --git a/docker-aliases.sh b/docker-aliases.sh index 3347335..ef8ae57 100644 --- a/docker-aliases.sh +++ b/docker-aliases.sh @@ -10,7 +10,7 @@ # # Usage: # # dcu : docker-compose up -d # # dcd : docker-compose down # -# dex : execute a bash shell inside the running # +# dex : execute a bash shell inside the RUNNING # # di : docker inspect # # dim : docker images # # dip : IP addresses of all running containers # @@ -20,6 +20,7 @@ # dpsa : docker ps -a # # drmc : remove all exited containers # # drmid : remove all dangling images # +# drun : execute a bash shell in NEW container from # # # ############################################################################ @@ -52,6 +53,10 @@ function dl-fn { docker logs -f $1 } +function drun-fn { + docker run -it $1 /bin/bash +} + alias dcu="docker-compose up -d" alias dcd="docker-compose down" alias dex=dex-fn @@ -63,4 +68,5 @@ alias dnames=dnames-fn 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)" \ No newline at end of file +alias drmid="docker rmi $( docker images -q -f dangling=true)" +alias drun=drun-fn \ No newline at end of file