mirror of
https://gist.github.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb
synced 2025-12-21 13:23:11 +01:00
This commit is contained in:
committed by
GitHub
parent
f0fc689dd1
commit
e31e88bb38
@@ -8,7 +8,8 @@
|
|||||||
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
|
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
|
||||||
# #
|
# #
|
||||||
# # Usage: #
|
# # Usage: #
|
||||||
# #
|
# dcu : docker-compose up -d #
|
||||||
|
# dcd : docker-compose down #
|
||||||
# dex <container>: execute a bash shell inside the running <container> #
|
# dex <container>: execute a bash shell inside the running <container> #
|
||||||
# di <container> : docker inspect <container> #
|
# di <container> : docker inspect <container> #
|
||||||
# dim : docker images #
|
# dim : docker images #
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
function dnames-fn {
|
function dnames-fn {
|
||||||
for ID in `docker ps | awk '{print $1}' | grep -v 'CONTAINER'`
|
for ID in `docker ps | awk '{print $1}' | grep -v 'CONTAINER'`
|
||||||
do
|
do
|
||||||
docker inspect $ID | grep Name | head -1 | awk '{print $2}' | sed 's/,//g' | sed 's%/%%g' | sed 's/"//g'
|
docker inspect $ID | grep Name | head -1 | awk '{print $2}' | sed 's/,//g' | sed 's%/%%g' | sed 's/"//g'
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,6 +45,8 @@ function di-fn {
|
|||||||
docker inspect $1
|
docker inspect $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias dcu="docker-compose up -d"
|
||||||
|
alias dcd="docker-compose down"
|
||||||
alias dex=dex-fn
|
alias dex=dex-fn
|
||||||
alias di=di-fn
|
alias di=di-fn
|
||||||
alias dim="docker images"
|
alias dim="docker images"
|
||||||
|
|||||||
Reference in New Issue
Block a user