mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Allow setting resource constrains for build
Closes #10191 Allow `docker build` to set --cpu-shares, --cpuset, --memory, --memory-swap for all containers created by the build. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@@ -1082,6 +1082,10 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite
|
||||
job.Setenv("forcerm", r.FormValue("forcerm"))
|
||||
job.SetenvJson("authConfig", authConfig)
|
||||
job.SetenvJson("configFile", configFile)
|
||||
job.Setenv("memswap", r.FormValue("memswap"))
|
||||
job.Setenv("memory", r.FormValue("memory"))
|
||||
job.Setenv("cpusetcpus", r.FormValue("cpusetcpus"))
|
||||
job.Setenv("cpushares", r.FormValue("cpushares"))
|
||||
|
||||
if err := job.Run(); err != nil {
|
||||
if !job.Stdout.Used() {
|
||||
|
||||
Reference in New Issue
Block a user