From eb93a865ed8be7b28e4b03eba975b242d231940d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 10 Apr 2020 13:45:10 +0200 Subject: [PATCH] improve "network prune" output to mention custom networks only The `docker network prune` command removes unused custom networks, but built-in networks won't be removed. This patch updates the message to mention that it's only removing custom networks. Signed-off-by: Sebastiaan van Stijn --- cli/command/network/prune.go | 2 +- docs/reference/commandline/network_prune.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/network/prune.go b/cli/command/network/prune.go index 462d3616ea..4f0617b0f6 100644 --- a/cli/command/network/prune.go +++ b/cli/command/network/prune.go @@ -43,7 +43,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command { return cmd } -const warning = `WARNING! This will remove all networks not used by at least one container. +const warning = `WARNING! This will remove all custom networks not used by at least one container. Are you sure you want to continue?` func runPrune(dockerCli command.Cli, options pruneOptions) (output string, err error) { diff --git a/docs/reference/commandline/network_prune.md b/docs/reference/commandline/network_prune.md index 37a9a6d734..05540f7d77 100644 --- a/docs/reference/commandline/network_prune.md +++ b/docs/reference/commandline/network_prune.md @@ -27,7 +27,7 @@ by any containers. ```bash $ docker network prune -WARNING! This will remove all networks not used by at least one container. +WARNING! This will remove all custom networks not used by at least one container. Are you sure you want to continue? [y/N] y Deleted Networks: n1