Last active
November 2, 2019 13:04
-
-
Save RichardDally/9a8ecfaee6942483e36679bba61f89bd to your computer and use it in GitHub Desktop.
Docker cheat sheet
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 all running containers | |
$ docker ps | |
List all containers | |
$ docker ps -a | |
Start mongo:3.4-xenial (tagged mongo-test-server) and expose port 27017 | |
$ docker run --publish 27017:27017 --name mongo-test-server --detach mongo:3.4-xenial | |
Stop container <container_name> | |
$ docker stop <container_name> | |
Remove all stop containers | |
$ docker rm $(docker ps -a -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment