From dd8dbbfe487f33802c3c4a807706b4b53449c82f Mon Sep 17 00:00:00 2001 From: Jintao Zhang Date: Sun, 21 Jul 2019 07:55:07 +0800 Subject: [PATCH] Add docker volume prune and docker network prune Signed-off-by: Jintao Zhang --- tools/docker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/docker.sh b/tools/docker.sh index 3149392..a24f374 100644 --- a/tools/docker.sh +++ b/tools/docker.sh @@ -22,6 +22,8 @@ docker push username/repository:tag # Upload tagged image to registry docker run username/repository:tag # Run image from a registry docker system prune # Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes. (Docker 17.06.1-ce and superior) docker system prune -a # Remove all unused containers, networks, images not just dangling ones (Docker 17.06.1-ce and superior) +docker volume prune # Remove all unused local volumes +docker network prune # Remove all unused networks ##############################################################################