2
0

docker-compose.plugin.zsh 796 B

123456789101112131415161718192021222324252627
  1. # Support Compose v2 as docker CLI plugin
  2. #
  3. # This tests that the (old) docker-compose command is in $PATH and that
  4. # it resolves to an existing executable file if it's a symlink.
  5. [[ -x "${commands[docker-compose]:A}" ]] && dccmd='docker-compose' || dccmd='docker compose'
  6. alias dco="$dccmd"
  7. alias dcb="$dccmd build"
  8. alias dce="$dccmd exec"
  9. alias dcps="$dccmd ps"
  10. alias dcrestart="$dccmd restart"
  11. alias dcrm="$dccmd rm"
  12. alias dcr="$dccmd run"
  13. alias dcstop="$dccmd stop"
  14. alias dcup="$dccmd up"
  15. alias dcupb="$dccmd up --build"
  16. alias dcupd="$dccmd up -d"
  17. alias dcupdb="$dccmd up -d --build"
  18. alias dcdn="$dccmd down"
  19. alias dcl="$dccmd logs"
  20. alias dclf="$dccmd logs -f"
  21. alias dclF="$dccmd logs -f --tail 0"
  22. alias dcpull="$dccmd pull"
  23. alias dcstart="$dccmd start"
  24. alias dck="$dccmd kill"
  25. unset dccmd