/bash/

.bash_aliases (docker)

2020-05-01 13:00:00

alias xx_dc='docker ps'
alias xx_dca='docker ps -a'
alias xx_di='docker images'
alias xx_dia='docker images -a'
xx_dcrm() {
    read -p "!!! Are you sure? You want to remove all docker containers !!! (Yy/Nn) " -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
        docker rm -f $(docker ps -aq)
    fi
}
xx_dirm() {
    read -p "!!! Are you sure? You want to remove all docker images !!! (Yy/Nn) " -n 1 -r
    if [[ $REPLY =~ ^[Yy]$ ]]
    then
        docker rmi -f $(docker images -aq)
    fi
}