alias.zsh 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. #
  2. # Defines Docker aliases.
  3. #
  4. # Author:
  5. # François Vantomme <akarzim@gmail.com>
  6. #
  7. #
  8. # Aliases
  9. #
  10. # Docker
  11. alias dk='docker'
  12. alias dka='docker attach'
  13. alias dkb='docker build'
  14. alias dkd='docker diff'
  15. alias dkdf='docker system df'
  16. alias dke='docker exec'
  17. alias dkE='docker exec -it'
  18. alias dkh='docker history'
  19. alias dki='docker images'
  20. alias dkin='docker inspect'
  21. alias dkim='docker import'
  22. alias dkk='docker kill'
  23. alias dkl='docker logs'
  24. alias dkli='docker login'
  25. alias dklo='docker logout'
  26. alias dkls='docker ps'
  27. alias dkp='docker pause'
  28. alias dkP='docker unpause'
  29. alias dkpl='docker pull'
  30. alias dkph='docker push'
  31. alias dkps='docker ps'
  32. alias dkpsa='docker ps -a'
  33. alias dkr='docker run'
  34. alias dkR='docker run -it --rm'
  35. alias dkRe='docker run -it --rm --entrypoint /bin/bash'
  36. alias dkRM='docker system prune'
  37. alias dkrm='docker rm'
  38. alias dkrmi='docker rmi'
  39. alias dkrn='docker rename'
  40. alias dks='docker start'
  41. alias dkS='docker restart'
  42. alias dkss='docker stats'
  43. alias dksv='docker save'
  44. alias dkt='docker tag'
  45. alias dktop='docker top'
  46. alias dkup='docker update'
  47. alias dkV='docker volume'
  48. alias dkv='docker version'
  49. alias dkw='docker wait'
  50. alias dkx='docker stop'
  51. ## Container (C)
  52. alias dkC='docker container'
  53. alias dkCa='docker container attach'
  54. alias dkCcp='docker container cp'
  55. alias dkCd='docker container diff'
  56. alias dkCe='docker container exec'
  57. alias dkCin='docker container inspect'
  58. alias dkCk='docker container kill'
  59. alias dkCl='docker container logs'
  60. alias dkCls='docker container ls'
  61. alias dkCp='docker container pause'
  62. alias dkCpr='docker container prune'
  63. alias dkCrn='docker container rename'
  64. alias dkCS='docker container restart'
  65. alias dkCrm='docker container rm'
  66. alias dkCr='docker container run'
  67. alias dkCR='docker container run -it --rm'
  68. alias dkCRe='docker container run -it --rm --entrypoint /bin/bash'
  69. alias dkCs='docker container start'
  70. alias dkCss='docker container stats'
  71. alias dkCx='docker container stop'
  72. alias dkCtop='docker container top'
  73. alias dkCP='docker container unpause'
  74. alias dkCup='docker container update'
  75. alias dkCw='docker container wait'
  76. ## Image (I)
  77. alias dkI='docker image'
  78. alias dkIb='docker image build'
  79. alias dkIh='docker image history'
  80. alias dkIim='docker image import'
  81. alias dkIin='docker image inspect'
  82. alias dkIls='docker image ls'
  83. alias dkIpr='docker image prune'
  84. alias dkIpl='docker image pull'
  85. alias dkIph='docker image push'
  86. alias dkIrm='docker image rm'
  87. alias dkIsv='docker image save'
  88. alias dkIt='docker image tag'
  89. ## Volume (V)
  90. alias dkV='docker volume'
  91. alias dkVin='docker volume inspect'
  92. alias dkVls='docker volume ls'
  93. alias dkVpr='docker volume prune'
  94. alias dkVrm='docker volume rm'
  95. ## Network (N)
  96. alias dkN='docker network'
  97. alias dkNs='docker network connect'
  98. alias dkNx='docker network disconnect'
  99. alias dkNin='docker network inspect'
  100. alias dkNls='docker network ls'
  101. alias dkNpr='docker network prune'
  102. alias dkNrm='docker network rm'
  103. ## System (Y)
  104. alias dkY='docker system'
  105. alias dkYdf='docker system df'
  106. alias dkYpr='docker system prune'
  107. ## Stack (K)
  108. alias dkK='docker stack'
  109. alias dkKls='docker stack ls'
  110. alias dkKps='docker stack ps'
  111. alias dkKrm='docker stack rm'
  112. ## Swarm (W)
  113. alias dkW='docker swarm'
  114. ## CleanUp (rm)
  115. # Clean up exited containers (docker < 1.13)
  116. alias dkrmC='docker rm $(docker ps -qaf status=exited)'
  117. # Clean up dangling images (docker < 1.13)
  118. alias dkrmI='docker rmi $(docker images -qf dangling=true)'
  119. # Clean up dangling volumes (docker < 1.13)
  120. alias dkrmV='docker volume rm $(docker volume ls -qf dangling=true)'
  121. # Docker Machine (m)
  122. alias dkm='docker-machine'
  123. alias dkma='docker-machine active'
  124. alias dkmcp='docker-machine scp'
  125. alias dkmin='docker-machine inspect'
  126. alias dkmip='docker-machine ip'
  127. alias dkmk='docker-machine kill'
  128. alias dkmls='docker-machine ls'
  129. alias dkmpr='docker-machine provision'
  130. alias dkmps='docker-machine ps'
  131. alias dkmrg='docker-machine regenerate-certs'
  132. alias dkmrm='docker-machine rm'
  133. alias dkms='docker-machine start'
  134. alias dkmsh='docker-machine ssh'
  135. alias dkmst='docker-machine status'
  136. alias dkmS='docker-machine restart'
  137. alias dkmu='docker-machine url'
  138. alias dkmup='docker-machine upgrade'
  139. alias dkmv='docker-machine version'
  140. alias dkmx='docker-machine stop'
  141. # Docker Compose (c)
  142. alias dkc='docker compose'
  143. alias dkcb='docker compose build'
  144. alias dkcB='docker compose build --no-cache'
  145. alias dkcd='docker compose down'
  146. alias dkce='docker compose exec'
  147. alias dkck='docker compose kill'
  148. alias dkcl='docker compose logs'
  149. alias dkcls='docker compose ps'
  150. alias dkcp='docker compose pause'
  151. alias dkcP='docker compose unpause'
  152. alias dkcpl='docker compose pull'
  153. alias dkcph='docker compose push'
  154. alias dkcps='docker compose ps'
  155. alias dkcr='docker compose run'
  156. alias dkcR='docker compose run --rm'
  157. alias dkcrm='docker compose rm'
  158. alias dkcs='docker compose start'
  159. alias dkcsc='docker compose scale'
  160. alias dkcS='docker compose restart'
  161. alias dkcu='docker compose up'
  162. alias dkcU='docker compose up -d'
  163. alias dkcv='docker compose version'
  164. alias dkcx='docker compose stop'