|
@@ -59,8 +59,8 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
|
flMemoryString := cmd.String([]string{"m", "-memory"}, "", "Memory limit")
|
|
flMemoryString := cmd.String([]string{"m", "-memory"}, "", "Memory limit")
|
|
flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Total memory (memory + swap), '-1' to disable swap")
|
|
flMemorySwap := cmd.String([]string{"-memory-swap"}, "", "Total memory (memory + swap), '-1' to disable swap")
|
|
flCPUShares := cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
flCPUShares := cmd.Int64([]string{"c", "-cpu-shares"}, 0, "CPU shares (relative weight)")
|
|
- flCpuPeriod := cmd.Int64([]string{"-cpu-period"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) period")
|
|
|
|
- flCpuQuota := cmd.Int64([]string{"-cpu-quota"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) quota")
|
|
|
|
|
|
+ flCPUPeriod := cmd.Int64([]string{"-cpu-period"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) period")
|
|
|
|
+ flCPUQuota := cmd.Int64([]string{"-cpu-quota"}, 0, "Limit the CPU CFS (Completely Fair Scheduler) quota")
|
|
flCPUSetCpus := cmd.String([]string{"-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)")
|
|
flCPUSetCpus := cmd.String([]string{"-cpuset-cpus"}, "", "CPUs in which to allow execution (0-3, 0,1)")
|
|
flCPUSetMems := cmd.String([]string{"-cpuset-mems"}, "", "MEMs in which to allow execution (0-3, 0,1)")
|
|
flCPUSetMems := cmd.String([]string{"-cpuset-mems"}, "", "MEMs in which to allow execution (0-3, 0,1)")
|
|
flCgroupParent := cmd.String([]string{"-cgroup-parent"}, "", "Optional parent cgroup for the container")
|
|
flCgroupParent := cmd.String([]string{"-cgroup-parent"}, "", "Optional parent cgroup for the container")
|
|
@@ -241,8 +241,8 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
|
v.Set("cpusetcpus", *flCPUSetCpus)
|
|
v.Set("cpusetcpus", *flCPUSetCpus)
|
|
v.Set("cpusetmems", *flCPUSetMems)
|
|
v.Set("cpusetmems", *flCPUSetMems)
|
|
v.Set("cpushares", strconv.FormatInt(*flCPUShares, 10))
|
|
v.Set("cpushares", strconv.FormatInt(*flCPUShares, 10))
|
|
- v.Set("cpuquota", strconv.FormatInt(*flCpuQuota, 10))
|
|
|
|
- v.Set("cpuperiod", strconv.FormatInt(*flCpuPeriod, 10))
|
|
|
|
|
|
+ v.Set("cpuquota", strconv.FormatInt(*flCPUQuota, 10))
|
|
|
|
+ v.Set("cpuperiod", strconv.FormatInt(*flCPUPeriod, 10))
|
|
v.Set("memory", strconv.FormatInt(memory, 10))
|
|
v.Set("memory", strconv.FormatInt(memory, 10))
|
|
v.Set("memswap", strconv.FormatInt(memorySwap, 10))
|
|
v.Set("memswap", strconv.FormatInt(memorySwap, 10))
|
|
v.Set("cgroupparent", *flCgroupParent)
|
|
v.Set("cgroupparent", *flCgroupParent)
|
|
@@ -250,11 +250,11 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
|
|
v.Set("dockerfile", relDockerfile)
|
|
v.Set("dockerfile", relDockerfile)
|
|
|
|
|
|
ulimitsVar := flUlimits.GetList()
|
|
ulimitsVar := flUlimits.GetList()
|
|
- ulimitsJson, err := json.Marshal(ulimitsVar)
|
|
|
|
|
|
+ ulimitsJSON, err := json.Marshal(ulimitsVar)
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
- v.Set("ulimits", string(ulimitsJson))
|
|
|
|
|
|
+ v.Set("ulimits", string(ulimitsJSON))
|
|
|
|
|
|
headers := http.Header(make(map[string][]string))
|
|
headers := http.Header(make(map[string][]string))
|
|
buf, err := json.Marshal(cli.configFile.AuthConfigs)
|
|
buf, err := json.Marshal(cli.configFile.AuthConfigs)
|