From e4a8e59cfa9d1ab87da7b76658a559c3d3884f26 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Wed, 5 Aug 2020 02:06:06 +0100 Subject: [PATCH 1/3] Add prune docker images instructions --- pkg/minikube/machine/advice.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/machine/advice.go b/pkg/minikube/machine/advice.go index dc08d9a667..a7d4cd7787 100644 --- a/pkg/minikube/machine/advice.go +++ b/pkg/minikube/machine/advice.go @@ -40,7 +40,8 @@ func MaybeDisplayAdvice(err error, driver string) { if errors.Is(err, oci.ErrExitedUnexpectedly) || errors.Is(err, oci.ErrDaemonInfo) { out.T(style.Tip, "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:", out.V{"driver_name": driver}) out.T(style.Empty, ` - - Prune unused {{.driver_name}} images, volumes and abandoned containers.`, out.V{"driver_name": driver}) + - Prune unused {{.driver_name}} images, volumes, networks and abandoned containers. + docker system prune --volumes`, out.V{"driver_name": driver}) out.T(style.Empty, ` - Restart your {{.driver_name}} service`, out.V{"driver_name": driver}) if runtime.GOOS != "linux" { From 481cb50f7492ab108cad8ce003075844d5462ad0 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Tue, 1 Sep 2020 15:05:10 +0100 Subject: [PATCH 2/3] Add leading newline for clarity --- pkg/minikube/machine/advice.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/minikube/machine/advice.go b/pkg/minikube/machine/advice.go index a7d4cd7787..0f802567ae 100644 --- a/pkg/minikube/machine/advice.go +++ b/pkg/minikube/machine/advice.go @@ -41,6 +41,7 @@ func MaybeDisplayAdvice(err error, driver string) { out.T(style.Tip, "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:", out.V{"driver_name": driver}) out.T(style.Empty, ` - Prune unused {{.driver_name}} images, volumes, networks and abandoned containers. + docker system prune --volumes`, out.V{"driver_name": driver}) out.T(style.Empty, ` - Restart your {{.driver_name}} service`, out.V{"driver_name": driver}) From dcd00b2150f3555c3a52bd6250af880790185a90 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Tue, 8 Sep 2020 23:37:25 +0100 Subject: [PATCH 3/3] Make prune conditional. Add podman to prune instruction --- pkg/minikube/machine/advice.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/minikube/machine/advice.go b/pkg/minikube/machine/advice.go index 0f802567ae..268ab56788 100644 --- a/pkg/minikube/machine/advice.go +++ b/pkg/minikube/machine/advice.go @@ -39,10 +39,12 @@ func MaybeDisplayAdvice(err error, driver string) { if errors.Is(err, oci.ErrExitedUnexpectedly) || errors.Is(err, oci.ErrDaemonInfo) { out.T(style.Tip, "If you are still interested to make {{.driver_name}} driver work. The following suggestions might help you get passed this issue:", out.V{"driver_name": driver}) - out.T(style.Empty, ` + if driver == oci.Docker || driver == oci.Podman { + out.T(style.Empty, ` - Prune unused {{.driver_name}} images, volumes, networks and abandoned containers. - docker system prune --volumes`, out.V{"driver_name": driver}) + {{.driver_name}} system prune --volumes`, out.V{"driver_name": driver}) + } out.T(style.Empty, ` - Restart your {{.driver_name}} service`, out.V{"driver_name": driver}) if runtime.GOOS != "linux" {