Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker has the same error regardless of what I try to build (windows 10)

Tags:

docker

windows

No matter what I try to build via the terminal docker has the exact same error below. I cannot figure out what is going wrong or where to even start to fix this. Thanks in advance for anyone who can tell me whats going wrong.

[+] Building 0.0s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 2B                                                                                 0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount365162480/Dockerfile: no such file or directory
like image 322
wyit Avatar asked Oct 16 '20 04:10

wyit


1 Answers

Frustratingly I hit this today after resetting my Docker Desktop Community edition (on Windows) to factory defaults. Builds were working fine before I did this. Anyway I saw this post and then found elsewhere (https://github.com/docker/buildx/issues/410) a reference to release notes for latest Docker version and the suggestion to disable buildkit:

Docker Desktop now enables BuildKit by default after a reset to factory defaults. To revert to the old docker build experience, go to Preferences > Docker Engine and then disable the BuildKit feature.

So I went to the Docker Engine screen and edited the config file

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": false,
  "experimental": false,
  "features": {
    "buildkit": true
  }
}

changing the buildkit entry to false and then just clicked apply and restart.

So it looks like an issue for certain Windows builds right now!

Hopefully this will get you working again.

like image 190
drivett27 Avatar answered Sep 17 '22 12:09

drivett27