remove also the container image on delete

This commit is contained in:
Christian Goll
2022-09-14 11:45:40 +02:00
parent 6cc58fcfff
commit c75f4e468c
2 changed files with 30 additions and 2 deletions

View File

@@ -119,9 +119,13 @@ ARG_LOOP:
err := container.DeleteSource(containerName)
if err != nil {
wwlog.Error("Could not remove source: %s\n", containerName)
} else {
fmt.Printf("Container has been deleted: %s\n", containerName)
}
err = container.DeleteImage(containerName)
if err != nil {
wwlog.Error("Could not remove image files %s\n", containerName)
}
fmt.Printf("Container has been deleted: %s\n", containerName)
}
return