title: Docker: Failed to register layer, access is denied error when building docker image
body: <p>I'm getting the following error when trying to build a docker image.
  The docker image is using Windows Container as the image will be using Windows Operating System as well.</p>
  <p><a href="https://i.stack.imgur.com/aruVT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aruVT.png" alt="enter image description here" /></a></p>
  <p>I've tried to run the terminal as Administrator, which should have the access to the mentioned folder (ProgramData\Docker....), but somehow it still fails with access is denied error.</p>
  <p>My Dockerfile content:</p>
  <pre><code>FROM &lt;docker source&gt;/sdk:4.8-windowsservercore-ltsc2019
  
  SHELL [&quot;powershell&quot;, &quot;-Command&quot;, &quot;$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';&quot;]
  
  COPY . /
  
  WORKDIR /
  </code></pre>
  <p>Any idea?</p>