Docker

Show running containers ("ProceSses")

docker ps  

Show containers, including stopped ones

docker ps --all  
docker ps -a  

Show all containers, without port numbers (since that messes with the formatting)

Formatting rules: https://docs.docker.com/engine/reference/commandline/ps/#formatting

docker ps --all --format "table {{.Names}}\t{{.Status}}"  

Stop container (ask kindly, to allow the container to stop gracefully)

docker stop <container naam>  

Remove the container, returns an error if it is still running ("ReMove")

docker rm <container naam>  

Remove the container, killing it if it is still running

docker rm --force <container naam>  
docker rm -f <container naam>  

Show container logs

docker logs <container naam>  

Show container logs, but just the last 100 lines

docker logs --tail 100 <container naam>  

Show container logs, and keep watching for new lines ("Follow")

docker logs --follow <container naam>  
docker logs -f <container naam>  

Run a command within the container ("EXECute")

docker exec <container naam> ls /home  

Enter a container using a shell

docker exec -it <container naam> sh  

Send logs to file

docker logs contaniername &> docker.log  

Remove all containers

docker rm $(docker ps -a -q)