Is there any command which can combine the docker stop and docker rm command together ? Each time I want to delete a running container, I need to execu
docker stop
docker rm
In my case, to remove the running containers I used
docker rm -f $(docker ps -a -q)
In case you also need to remove the images, then run docker rmi $(docker images -q) afterwards.
docker rmi $(docker images -q)
Only run docker rmi $(docker images -q) if you want to remove the images.