feat: add filter functions for docker

This commit is contained in:
Yuanhao Ji 2024-07-14 14:33:53 +08:00
commit f6c06ebfc3
No known key found for this signature in database
GPG key ID: 1026820B3E5B996B
2 changed files with 52 additions and 37 deletions

View file

@ -34,6 +34,18 @@ alias dvprune='docker volume prune'
alias dxc='docker container exec'
alias dxcit='docker container exec -it'
function dpsf {
docker ps --filter "name=${1}"
}
function dpsfa {
docker ps --filter "name=${1}" -a
}
function dif() {
docker images --filter "reference=*${1}*"
}
if (( ! $+commands[docker] )); then
return
fi