1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

propagate CpuShares in mergeConfig

This commit is contained in:
Jérôme Petazzoni 2013-05-07 11:44:38 -07:00
parent af9f559f2e
commit eef8b0d406

View file

@ -38,6 +38,9 @@ func (builder *Builder) mergeConfig(userConf, imageConf *Config) {
if userConf.MemorySwap == 0 { if userConf.MemorySwap == 0 {
userConf.MemorySwap = imageConf.MemorySwap userConf.MemorySwap = imageConf.MemorySwap
} }
if userConf.CpuShares == 0 {
userConf.CpuShares = imageConf.CpuShares
}
if userConf.PortSpecs == nil || len(userConf.PortSpecs) == 0 { if userConf.PortSpecs == nil || len(userConf.PortSpecs) == 0 {
userConf.PortSpecs = imageConf.PortSpecs userConf.PortSpecs = imageConf.PortSpecs
} }