Last active
February 28, 2020 15:01
-
-
Save ToanPV90/92c729a4c1a0bbcec9b066f071b471b5 to your computer and use it in GitHub Desktop.
docker cheatsheet
This file contains 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 | |
$ docker images -a | |
Run container with mapping port | |
$ docker run -d -p {localhost-port}:{container-port} image_name | |
Removing images according to a pattern | |
$ docker images -a | grep "pattern" | awk '{print $3}' | xargs docker rmi -f | |
Removing all images | |
$ docker rmi $(docker images -a -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment