1
0
mirror of https://github.com/moby/moby.git synced 2025-07-27 20:02:03 +03:00

Remove job from rmi

Signed-off-by: Antonio Murdaca <me@runcom.ninja>
This commit is contained in:
Antonio Murdaca
2015-04-09 13:59:50 +02:00
parent 6b7e520aa3
commit e4afc379dc
4 changed files with 21 additions and 26 deletions

View File

@ -878,12 +878,18 @@ func deleteImages(eng *engine.Engine, version version.Version, w http.ResponseWr
if vars == nil {
return fmt.Errorf("Missing parameter")
}
var job = eng.Job("image_delete", vars["name"])
streamJSON(job, w, false)
job.Setenv("force", r.Form.Get("force"))
job.Setenv("noprune", r.Form.Get("noprune"))
return job.Run()
d := getDaemon(eng)
name := vars["name"]
force := toBool(r.Form.Get("force"))
noprune := toBool(r.Form.Get("noprune"))
list, err := d.ImageDelete(name, force, noprune)
if err != nil {
return err
}
return writeJSON(w, http.StatusOK, list)
}
func postContainersStart(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error {