Pause/freeze containers during commit
Initiates a pause before committing a container, adds a pause option to the commit command, defaulting to 'true'. Fixes bug: #6267 Fixes bug: #3675 Docker-DCO-1.1-Signed-off-by: Eric Windisch <ewindisch@docker.com> (github: ewindisch) Upstream-commit: 17d870bed5ef997c30da1e8b9843f4e84202f8d4 Component: engine
This commit is contained in:
committed by
Victor Vieux
parent
e07af8c844
commit
ae1f05d70a
@ -439,6 +439,12 @@ func postCommit(eng *engine.Engine, version version.Version, w http.ResponseWrit
|
||||
utils.Errorf("%s", err)
|
||||
}
|
||||
|
||||
if r.FormValue("pause") == "" && version.GreaterThanOrEqualTo("1.13") {
|
||||
job.Setenv("pause", "1")
|
||||
} else {
|
||||
job.Setenv("pause", r.FormValue("pause"))
|
||||
}
|
||||
|
||||
job.Setenv("repo", r.Form.Get("repo"))
|
||||
job.Setenv("tag", r.Form.Get("tag"))
|
||||
job.Setenv("author", r.Form.Get("author"))
|
||||
|
||||
Reference in New Issue
Block a user