mirror of https://github.com/docker/docs.git
[GH-1740] Fix cpu allocation bug
Signed-off-by: Fabio Rapposelli <fabio@vmware.com>
This commit is contained in:
parent
e416ac17d8
commit
ffe1a7940b
|
@ -112,6 +112,9 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
|
|||
|
||||
// We support a maximum of 16 cpu to be consistent with Virtual Hardware 10
|
||||
// specs.
|
||||
if d.CPU < 1 {
|
||||
d.CPU = int(runtime.NumCPU())
|
||||
}
|
||||
if d.CPU > 16 {
|
||||
d.CPU = 16
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue