Make prune conditional. Add podman to prune instruction

pull/8918/head
Dean Coakley 2020-09-08 23:37:25 +01:00
parent 481cb50f74
commit dcd00b2150
1 changed files with 4 additions and 2 deletions

View File

@ -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})
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" {