This may appear for dockers 1.10 or 1.11 (Q1 2016): PR 15078 implements (December 2015) support for changing resources (including CPU) for both stopped and starting containers.
Update 2016: part of docker 1.10 and is documented in docker update ( PR 15078 ).
We decided to allow the installation of what we call resources, which now consists of cgroup thingies, hence PR # 18073 .
The only valid mutable container elements are in HostConfig and exactly in resources (see struct ).
resources := runconfig.Resources{ BlkioWeight: *flBlkioWeight, CpusetCpus: *flCpusetCpus, <==== CpusetMems: *flCpusetMems, <==== CPUShares: *flCPUShares, <==== Memory: flMemory, MemoryReservation: memoryReservation, MemorySwap: memorySwap, KernelMemory: kernelMemory, CPUPeriod: *flCPUPeriod, CPUQuota: *flCPUQuota, }
- Team should be
set (at the end: update ). - Permitted changes are passed as flags: for example.
--memory=1Gb --cpushare=β¦ (as PR does). - There is one flag for each attribute of the
Resources structure (and no more, no less).
Please note that changes through docker set must be kept.
Ie, these changes will be permanent (updated in the JSON container).
source share