<p>I'm using Minikube in Windows 10 and I'd like to use locally built Docker images instead of images hosted in a registry, so, according <a href="https://medium.com/@maumribeiro/running-your-own-docker-images-in-minikube-for-windows-ea7383d931f6" rel="nofollow noreferrer">this tutorial</a>, I have to run next commands:</p>

<p>Use local kubernetes and images:</p>

<pre><code>&gt; minikube docker-env
</code></pre>

<p>The output is:</p>

<pre><code>PS C:\WINDOWS\system32&gt; minikube docker-env
$Env:DOCKER_TLS_VERIFY = "1"
$Env:DOCKER_HOST = "tcp://10.98.38.126:2376"
$Env:DOCKER_CERT_PATH = "C:\Users\MyUser\.minikube\certs"
# Run this command to configure your shell:
# &amp; minikube docker-env | Invoke-Expression
</code></pre>

<p>To configure the shell, run this:</p>

<pre><code>&gt; &amp; minikube docker-env | Invoke-Expression
</code></pre>

<p>After that, I need to build a new image:</p>

<pre><code>PS D:\repos\test&gt; docker build -t miImage:v1 .
</code></pre>

<p>And I have next error:</p>

<pre><code>PS D:\repos\test&gt; docker build -t miImage:v1 .
Sending build context to Docker daemon   8.62MB
Step 1/10 : FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
Get https://mcr.microsoft.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
</code></pre>

<p>This is error is thrown since I configured it to use local images, is there any way to fix it?</p>

<p>it looks like the machine that you're using to build is unable to reach <a href="https://mcr.microsoft.com/v2/" rel="nofollow noreferrer">https://mcr.microsoft.com/v2/</a> to confirm that, try to send a simple GET to the URL</p>

<pre><code>wget https://mcr.microsoft.com/v2/
</code></pre>

<p>if that's the problem, you can use a different machine to pull the image, then save it to a file and load it on the target machine. </p>

<pre><code>#on a machine connected to internet 
docker pull mcr.microsoft.com/dotnet/core/sdk:2.2
docker save mcr.microsoft.com/dotnet/core/sdk:2.2 &gt; dotnetsdk2_2.tar
# download the file
# on the target machine 
docker load &lt; dotnetsdk2_2.tar
</code></pre>

<p>then your build should work without a problem using the local version of the image.</p>
