I\'m reading a book on docker. It is a couple of years old.
I\'ll cite:
If you want to get rid of all your stopped containers, you can use
the output of
Actually its an rights issue.... the error message:
Got permission denied while trying to connect to the Docker daemon socket at unix://
Tells you that you cant connect to you docker daemon which is running under root. You should decide if you want to use docker with # sudo
or as root user.
Manage Docker as a non-root user
Further as said the docker rm
complains about no images found for deletion therefore it wouldn't possible to delete images.
The command docker rm $(docker ps -aq -f status=exited)
is just fine with newest docker version 18.09.0 but you could use docker container prune
as well that is the more interactive way.