Merge pull request #8918 from Dean-Coakley/add-pruneDocker-helper

Add prune docker images instructions
pull/9267/head
Medya Ghazizadeh 2020-09-16 16:44:02 -07:00 committed by GitHub
commit a2c2a83903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -39,8 +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, `
- Prune unused {{.driver_name}} images, volumes and abandoned containers.`, 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.
{{.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" {