Docker Cheat Sheet

This cheat sheet is designed to provide a quick reference for docker commands that I use all the time.  I hope it helps someone else out there!

List All Docker Containers:

docker ps -aq

Stop All Running Docker Containers:

docker stop $(docker ps -aq)

Remove All Containers (USE WITH CAUTION)

docker rm $(docker ps -aq)

Access Bash Shell Prompt in Running Container

docker exec -it CONTAINER_ID /bin/bash 

Access Mongo DB Shell in Running Mongo Container

docker exec -it CONTAINER_ID mongo 


Ty Author

Leave a Reply

Your email address will not be published. Required fields are marked *