mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
default to deleting images via the remote api
This makes the remote API version 1.12 and newer default to automatically deleting intermediate containers when the build has succeedeed. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
@@ -903,8 +903,11 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite
|
||||
} else {
|
||||
job.Stdout.Add(utils.NewWriteFlusher(w))
|
||||
}
|
||||
|
||||
if r.FormValue("forcerm") == "1" && version.GreaterThanOrEqualTo("1.12") {
|
||||
job.Setenv("rm", "1")
|
||||
} else if r.FormValue("rm") == "" && version.GreaterThanOrEqualTo("1.12") {
|
||||
job.Setenv("rm", "1")
|
||||
} else {
|
||||
job.Setenv("rm", r.FormValue("rm"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user