Last active
May 3, 2017 07:50
-
-
Save noherczeg/6d56d8d9c3ce6d25cfc58ce301d7c255 to your computer and use it in GitHub Desktop.
Common Docker commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # --------------------------------------------- | |
| # list images, containers | |
| # --------------------------------------------- | |
| docker images | |
| docker ps -a | |
| # --------------------------------------------- | |
| # Delete all containers | |
| # --------------------------------------------- | |
| docker rm $(docker ps -a -q) | |
| # --------------------------------------------- | |
| # Delete all images | |
| # --------------------------------------------- | |
| docker rmi $(docker images -q) | |
| # --------------------------------------------- | |
| # Clear all images and containers | |
| # --------------------------------------------- | |
| docker rm $(docker ps -a -q) | |
| docker rmi $(docker images -q) | |
| # --------------------------------------------- | |
| # get inside a running container | |
| # --------------------------------------------- | |
| docker exec -i -t ${IMAGE_ID} /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment