Reference URL: https://medium.com/@clasikas/docker-tips-tricks-or-just-useful-commands-6e1fd8220450
docker ps # show only running
docker ps -a # show all containers
docker rm $(docker ps -q -f status=exited)
docker stop $(docker ps -q) # will run stop only for active containers
docker stop $(docker ps -aq) # will run stop for all
docker rmi $(docker images -q)
docker exec <YOUR_CONTAINER> echo "Hello from container!"
alias dr='docker rm $(docker ps -aq)'
alias ds='docker stop $(docker ps -aq)'
alias di='docker images'
alias dri='docker rmi $(docker images -q)'
alias dsr='ds && dr'
alias dps='docker ps -a'