<p>I am having this error, after running <strong>skaffold dev</strong>.</p>
<pre><code>Step 1/6 : FROM node:current-alpine3.11
exiting dev mode because first build failed: unable to stream build output: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.49.1:53: read udp 192.168.49.2:35889-&gt;192.168.49.1:53: i/o timeout. Please fix the Dockerfile and try again..

</code></pre>
<p>Here is skaffold.yml</p>
<pre><code>apiVersion: skaffold/v2beta11
kind: Config
metadata:
  name: *****
build:
  artifacts:
    - image: 127.0.0.1:32000/auth
      context: auth
      docker:
        dockerfile: Dockerfile
deploy:
  kubectl:
    manifests:
      - infra/k8s/auth-depl.yaml
  local:
    push: false
  artifacts:
    - image: 127.0.0.1:32000/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: &quot;src/**/*.ts&quot;
            dest: .

</code></pre>
<p>I have tried all possible solutions I saw online, including adding 8.8.8.8 as the DNS, but the error still persists. I am using Linux and running ubuntu, I am also using Minikube locally. Please assist.</p>

<p><em>This is a Community Wiki answer, posted for better visibility, so feel free to edit it and add any additional details you consider important.</em></p>
<p>In this case:</p>
<pre><code>minikube delete &amp;&amp; minikube start
</code></pre>
<p>solved the problem but you can start from restarting <strong>docker daemon</strong>. Since this is <strong>Minikube</strong> cluster and <strong>Skaffold</strong> uses for its builds <strong>Minikube's Docker daemon</strong>, as suggested by <a href="https://stackoverflow.com/users/600339/brian-de-alwis">Brian de Alwis</a> in his comment, you may start from:</p>
<pre><code>minikube stop &amp;&amp; minikube start
</code></pre>
<p>or</p>
<pre><code>minikube ssh
su
systemctl restart docker
</code></pre>
<p>I searched for similar errors and in many cases e.g. <a href="https://stackoverflow.com/a/61114031">here</a> or <a href="https://github.com/docker/for-mac/issues/1317" rel="nofollow noreferrer">in this thread</a>, setting up your DNS to something reliable like <code>8.8.8.8</code> may also help:</p>
<pre><code>sudo echo &quot;nameserver 8.8.8.8&quot; &gt;&gt; /etc/resolv.conf
</code></pre>
<p>in case you use <strong>Minikube</strong> you should first:</p>
<pre><code>minikube ssh

su ### to become root
</code></pre>
<p>and then run:</p>
<pre><code>echo &quot;nameserver 8.8.8.8&quot; &gt;&gt; /etc/resolv.conf
</code></pre>
<p>The following error message:</p>
<pre><code>Please fix the Dockerfile and try again
</code></pre>
<p>may be somewhat misleading in similar cases as <code>Dockerfile</code> is probably totally fine, but as we can read in other part:</p>
<pre><code>lookup registry-1.docker.io on 192.168.49.1:53: read udp 192.168.49.2:35889-&gt;192.168.49.1:53: i/o timeout.
</code></pre>
<p>it's definitely related with failing DNS lookup. This is well described <a href="http://docs.docker.oeynet.com/docker-cloud/docker-errors-faq/" rel="nofollow noreferrer">here</a> as well known issue.</p>
<blockquote>
<h2>Get i/o timeout</h2>
<p><em>Get <a href="https://index.docker.io/v1/repositories/" rel="nofollow noreferrer">https://index.docker.io/v1/repositories/</a>/images: dial tcp: lookup  on :53: read udp :53: i/o timeout</em></p>
<h3>Description</h3>
<p>The DNS resolver configured on the host cannot resolve the registry’s
hostname.</p>
<h3>GitHub link</h3>
<p>N/A</p>
<h3>Workaround</h3>
<p>Retry the operation, or if the error persists, use another DNS
resolver. You can do this by updating your  <code>/etc/resolv.conf</code>  file
with these or other DNS servers:</p>
<p><code>nameserver 8.8.8.8 nameserver 8.8.4.4</code></p>
</blockquote>
