DEV Community

Discussion on: Useful Docker shell aliases to speed up Development

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"

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.

abhinav1217 profile image
Abhinav Kulshreshtha • Edited on

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.