title: How to make Docker use all CPU cores?
body: <p>I'm trying to get Docker to use all the available CPU cores on my hardware (4). Docker can only see one CPU core:</p>
  
  <pre><code>$ docker run --cpuset-cpus="0-3" -ti ubuntu bash
  C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: Requested CPUs are not available - requested 0-3, available: 0.
  See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
  </code></pre>
  
  <p><strong>How do I make Docker use all available cores?</strong></p>
  
  <p>The Docker documentation claims that setting the cpus flag to 0.000 forces Docker to use all available cores, but this doesn't work for me:</p>
  
  <pre><code>$ docker run --cpus=0.000  -ti ubuntu bash
  root@36855ab28928:/# cat /proc/cpuinfo
  processor       : 0
  vendor_id       : GenuineIntel
  cpu family      : 6
  model           : 58
  model name      : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
  stepping        : 9
  microcode       : 0x19
  cpu MHz         : 2890.620
  cache size      : 4096 KB
  physical id     : 0
  siblings        : 1
  core id         : 0
  cpu cores       : 1
  apicid          : 0
  initial apicid  : 0
  fpu             : yes
  fpu_exception   : yes
  cpuid level     : 13
  wp              : yes
  flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 cx16 pcid sse4_1 sse4_2 popcnt aes xsave avx rdrand hypervisor lahf_lm pti fsgsbase
  bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
  bogomips        : 5781.24
  clflush size    : 64
  cache_alignment : 64
  address sizes   : 36 bits physical, 48 bits virtual
  power management:
  </code></pre>
  
  <pre><code>$ docker run --cpus=0.000 -ti ubuntu bash
  root@6c1d6934a0fe:/# lscpu | head -n 10
  Architecture:        x86_64
  CPU op-mode(s):      32-bit, 64-bit
  Byte Order:          Little Endian
  CPU(s):              1
  On-line CPU(s) list: 0
  Thread(s) per core:  1
  Core(s) per socket:  1
  Socket(s):           1
  NUMA node(s):        1
  Vendor ID:           GenuineIntel
  root@6c1d6934a0fe:/#
  </code></pre>
  
  <p>I'm using Docker Quickstart Terminal to get the command prompt that you see above. </p>
  
  <p>My physical hardware is a Windows 10 laptop. Using Bash on Ubuntu on Windows:</p>
  
  <pre><code>$ lscpu | head -n 10
  Architecture:        x86_64
  CPU op-mode(s):      32-bit, 64-bit
  Byte Order:          Little Endian
  CPU(s):              4
  On-line CPU(s) list: 0-3
  Thread(s) per core:  2
  Core(s) per socket:  2
  Socket(s):           1
  Vendor ID:           GenuineIntel
  CPU family:          6
  </code></pre>
  
  <p>I have Oracle VM Virtualbox installed, but I don't know if that has anything to do with this. I'm a Docker total novice. Other answers on Stack Overflow (<a href="https://stackoverflow.com/questions/37871540/how-many-cpus-does-a-docker-container-use">1</a>) claim that by default all CPUs are available, and have found no information online to the contrary. I've scoured the Docker documentation and found nothing that would indicate that I need to do something special to unlock the other CPU cores.</p>