title: CPU resources during docker build command on Windows
body: <p>How can one control how many logical processors are used by <code>docker build</code> command on Windows?</p>
  
  <p>I have this dockerfile:</p>
  
  <pre><code>FROM mcr.microsoft.com/windows/servercore:1803
  SHELL ["powershell", "-NoLogo"]
  RUN Get-ComputerInfo -Property *proc*
  CMD Get-ComputerInfo -Property *proc*
  </code></pre>
  
  <p>and when I build an image I see the following output:</p>
  
  <pre><code>CsNumberOfLogicalProcessors : 2
  CsNumberOfProcessors        : 1
  </code></pre>
  
  <p>Note that my computer has 4 logical processors and when I run container with <code>--cpus 4</code> option I get an expected result:</p>
  
  <pre><code>CsNumberOfLogicalProcessors : 4
  CsNumberOfProcessors        : 1
  </code></pre>
  
  <p>What confuses me is why <code>docker build</code> does not support <code>--cpus</code> option  since it runs containers when creating image layers.</p>
  
  <p>Docker info:</p>
  
  <pre><code>Containers: 0
   Running: 0
   Paused: 0
   Stopped: 0
  Images: 41
  Server Version: 18.09.0
  Storage Driver: windowsfilter
   Windows:
  Logging Driver: json-file
  Plugins:
   Volume: local
   Network: ics l2bridge l2tunnel nat null overlay transparent
   Log: awslogs etwlogs fluentd gelf json-file local logentries splunk syslog
  Swarm: inactive
  Default Isolation: hyperv
  Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
  Operating System: Windows 10 Pro Version 1809 (OS Build 17763.194)
  OSType: windows
  Architecture: x86_64
  CPUs: 4
  Total Memory: 7.891GiB
  Name: Robo
  ID: K3BP:UY7Z:JEXA:EJZ6:IYK6:WMW4:L4P4:5GTY:VR7K:SQKR:5QMO:AIEA
  Docker Root Dir: C:\ProgramData\Docker
  Debug Mode (client): false
  Debug Mode (server): true
   File Descriptors: -1
   Goroutines: 28
   System Time: 2018-12-16T16:48:59.7060639Z
   EventsListeners: 1
  Registry: https://index.docker.io/v1/
  Labels:
  Experimental: false
  Insecure Registries:
   127.0.0.0/8
  Live Restore Enabled: false
  Product License: Community Engine
  </code></pre>