DEV Community

Discussion on: Useful Docker shell aliases to speed up Development

Collapse
 
danielkun profile image
Daniel Albuschat

Nice cheat-sheet, thanks!

I can add:

# Remove stopped containers, unused images, unused networks, etc.:
alias dsp="docker system prune"
Enter fullscreen mode Exit fullscreen mode

I'd recommend starting all alias names with a common prefix, so that you can list the available aliases with tab-completion. Something uncommon like dk or something. Then you can do dk<TAB> and see all your aliases.

Collapse
 
abhinav1217 profile image
Abhinav Kulshreshtha • Edited

Good to know I am not the only one with this idea. I prefix all my tool related alias like fld_prune = docker system prune and flk_delete = kubectl delete. fl is my handler, fld_ are my docker alias, flk_ are kube related aliases. fly_ are youtube-dl related alias. Only tools related aliases are prefixed, common aliases are not prefixed so cls=clear and md=mkdir -p are unprefixed.