feat(shell): add alias to stop docker containers by name filter

This commit is contained in:
spy4x 2024-03-16 18:43:47 +08:00
parent 580478629a
commit f0d7d56e0c

View File

@ -26,6 +26,12 @@ alias gr="git restore --staged"
# docker START
alias dc="docker compose up -d"
alias dd="docker compose down"
function dockerStop(){
# Stops containers with name that contains argument $1.
# If argument $1 is not provided - stops all docker containers
docker ps --filter "name=$1" -q | xargs -r docker stop;
};
alias ds="dockerStop"
alias dclean="docker system prune -af"
# docker END