diff --git a/main.go b/main.go index 8e93668..d8458a0 100644 --- a/main.go +++ b/main.go @@ -457,10 +457,16 @@ func main() { App: app, } - err = container.Delete() + status, err := container.Status() if err != nil { return c.JSONPretty(http.StatusInternalServerError, Message{Message: err.Error()}, JSONIndent) } + if status != "no-container" { + err = container.Delete() + if err != nil { + return c.JSONPretty(http.StatusInternalServerError, Message{Message: err.Error()}, JSONIndent) + } + } err = apps.Delete(name) if err != nil {