# vim: ft=zsh

alias dk='docker'

## container
alias dkc='docker container' \
      dkcc='docker container create' \
      dkci='docker container inspect' \
      dkcls='docker container ls' \
      dkclsa='docker container ls -a' \
      dkclsaq='docker container ls -a -q' \
      dkclsq='docker container ls -q' \
      dkcrm!='docker container rm -f' \
      dkcrm='docker container rm' \
      dkcsp='docker container stop' \
      dkcst='docker container restart' \
      dkex='docker container exec -i -t' \
      dklo='docker logs -f' \
      dkr='docker run -i -t' \
      dktop='docker top'

## image
alias dkb='docker build . -t' \
      dki='docker image' \
      dkic='docker image create' \
      dkii='docker image inspect' \
      dkil='docker pull' \
      dkils='docker image ls' \
      dkilsa='docker image ls -a' \
      dkilsaq='docker image ls -a -q' \
      dkilsq='docker image ls -q' \
      dkip='docker image push' \
      dkirm!='docker image rm -f' \
      dkirm='docker image rm' \
      dkis='docker image save' \
      dkit='docker image tag'

## volume
alias dkv='docker volume' \
      dkvc='docker volume create' \
      dkvi='docker volume inspect' \
      dkvls='docker volume ls' \
      dkvlsq='docker volume ls -q' \
      dkvrm!='docker volume rm -f' \
      dkvrm='docker volume rm'

## network
alias dkn='docker network' \
      dknc='docker network create' \
      dkni='docker network inspect' \
      dknls='docker network ls' \
      dknlsq='docker network ls -q' \
      dknrm!='docker network rm -f' \
      dknrm='docker network rm'

## system
alias dksys='docker system' \
      dksysdf='docker system df' \
      dksysp!='docker system prune -f' \
      dksysp='docker system prune'

# compose
alias dc='docker-compose' \
      dcd='docker-compose down' \
      dcup='docker-compose up' \
      dcupb='docker-compose up --build' \
      dcupd='docker-compose up -d' \
      dcupdb='docker-compose up -d --build'

## container
alias dccls='docker-compose ps' \
      dcclsq='docker-compose ps -q' \
      dcex='docker-compose exec' \
      dcr='docker-compose run --rm' \
      dcrd='docker-compose run -d --rm' \
      dcrm!='docker-compose rm -f' \
      dcrm='docker-compose rm' \
      dcrmv!='docker-compose rm -v -f' \
      dcrmv='docker-compose rm -v' \
      dcsp='docker-compose stop' \
      dcst='docker-compose restart'

## image
alias dcb!='docker-compose build --no-cache' \
      dcb='docker-compose build' \
      dcl='docker-compose pull'
