This commit is contained in:
Jérémie Grodziski
2020-07-21 22:41:12 +02:00
committed by GitHub
parent 1340460b41
commit c9d73ad86b

View File

@@ -8,6 +8,7 @@
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
# daws <svc> <cmd> <opts> : aws cli in docker with <svc> <cmd> <opts> #
# dc : docker-compose #
# dcu : docker-compose up -d #
# dcd : docker-compose down #
@@ -23,7 +24,6 @@
# drmc : remove all exited containers #
# drmid : remove all dangling images #
# drun <image> : execute a bash shell in NEW container from <image> #
# dsp : docker system prune --all #
# dsr <container>: stop then remove <container> #
# #
############################################################################
@@ -46,7 +46,7 @@ function dip-fn {
echo $OUT|column -t
}
function dex-fn {
function dex-fn {
docker exec -it $1 ${2:-bash}
}
@@ -88,7 +88,16 @@ function dc-fn {
docker-compose $*
}
alias dc="dc-fn"
function d-aws-cli-fn {
docker run \
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
amazon/aws-cli:latest $1 $2 $3
}
alias daws=d-aws-cli-fn
alias dc=dc-fn
alias dcu="docker-compose up -d"
alias dcd="docker-compose down"
alias dcr=dcr-fn