aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-11-13 19:11:18 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-11-13 19:11:18 +0000
commit9cfb8d30a7e0fc92dc60f4dad30efc7231b363dc (patch)
treeefb81da874ae4fc1e73cec5707a8b9e5cb3dee73
parent2b39a67c571d1b6ea2375f65be6bf55831e4eaac (diff)
README.md: added commands to delete all Docker images
Until now we had described the basic commands on how to create and use Docker images, but we hadn't mentioned how you can delete them. With this commit the commands necessary for deleting Docker images have also been added at the bottom of the section on Docker.
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index aadfcef..e9de293 100644
--- a/README.md
+++ b/README.md
@@ -414,6 +414,18 @@ command).
docker cp CONTAINER:/file/path/within/container /host/path/target
```
+#### Deleting all Docker images
+
+After doing your tests/work, you may no longer need the multi-gigabyte
+files images, so its best to just delete them. To do this, just run the two
+commands below to first stop all running containers and then to delete all
+the images:
+
+```shell
+docker ps -a -q | xargs docker rm
+docker images -a -q | xargs docker rmi -f
+```
+