buildx: 'docker build' error: "failed to solve with frontend dockerfile.v0"

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: DAA27533-4D93-4AF4-916C-8492CC6BF66B/20201015121621

Expected behavior

I expect to build a docker image from my Dockerfile for my R Shiny application.

Actual behavior

I get the resulting error from the docker build command: Capture

Information

Docker version is: Capture

Windows Version: Windows 10 Home, version 1909

And docker run hello-world does work as expected: Capture

I’m working with Docker Desktop for Windows 10 Home and I’ve followed this guide for the installation: Install Docker Desktop on Windows Home

Since I think I have followed the guide correctly, and passed the docker run hello-world test, I’m not sure how to begin debugging this error.

I would really appreciate any help on clarifying what the error means, and how to potentially address it. Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 16
  • Comments: 78 (15 by maintainers)

Most upvoted comments

Name the file Dockerfile exactly. I got the same error because i named it DockerFile

Hi, I had the same issue and I could finally solve it by disabling buildkit feature as explained here: https://stackoverflow.com/questions/64382812/docker-has-the-same-error-regardless-of-what-i-try-to-build-windows-10

Simply change name of “dockerfile” to “Dockerfile” and then build, it works for me.

changing name ‘Dockerfile’ from ‘dockerfile’ also worked for me

@tonistiigi file name is not the only issue here, or I have just another bug

Here is what I face when running docker build command:

failed to solve with frontend dockerfile.v0: failed to build LLB: failed to load cache key: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-desktop.exe": executable file not found in $PATH, out: ``

Renaming "credsStore": "desktop.exe" to "credStore": "desktop.exe" in ~/.docker/config.json is what helped me actually, but it seems like Docker Destkop keeps adding credsStore entry in that config file

edit by @tonistiigi : please see https://github.com/docker/buildx/issues/415#issuecomment-762233853 before following this advice

I just hit the same issue. I use the WSL2 engine, which is of course case-sensitive. The command sent to docker from Visual Studio is specifying a fully lowercase path, which breaks the command of course.

For anyone stumbling across this issue on mac… failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = failed to parse /Users/myusername/.docker/.token_seed: unexpected end of JSON input

I just deleted .token_seed and .token_seed.lock inside of /Users/myusename/.docker

@nromagno Sure thing.

Click on this little bug icon up to the right, and then you’ll see the following settings:

purge-and-reset

I think I might have also reset to factory settings. Not sure though

image even the tutorial in a fresh Docker Desktop installation fails…

I had this same problem. Just Sgin in in your Docker account

Same here: failed to solve with frontend dockerfile.v0: failed to build LLB: $ docker --version Docker version 19.03.13, build 4484c46d9d

Deleting docker config file from inside WSL2 Ubuntu shell fixed it for me:

rm ~/.docker/config.json

I’m using Windows 10.

Well, docker message is confusing. In my case I just used invalid working directory (so I just have to cd to the right subdir with my Dockerfile).

Instead of explaining message like “No Dockerfile found, looked at current working directory /foo/bar” on my docker build --no-cache --tag jaroslavtyc/pb-web:8.0 . command I saw

[+] Building 0.0s (2/2) FINISHED                                                                                                                                                                                                        
 => [internal] load build definition from Dockerfile                                                                                                                                                                               0.0s
 => => transferring dockerfile: 2B                                                                                                                                                                                                 0.0s
 => CANCELED [internal] load .dockerignore                                                                                                                                                                                         0.0s
 => => transferring context:                                                                                                                                                                                                       0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount710040659/Dockerfile: no such file or directory

Hi, I had the same issue and I could finally solve it by disabling buildkit feature as explained here: https://stackoverflow.com/questions/64382812/docker-has-the-same-error-regardless-of-what-i-try-to-build-windows-10

I tired this and it finally worked! thanks!

I had the same issue (on a Mac). running a test from my home directory /Users/norm failed to solve with frontend dockerfile.v0: failed to build LLB: error from sender: open .Trash: operation not permitted

I moved the Dockerfile out of my home directory into a subdirectory (/Users/norm/test/) and was able to build without the above error when executed from /Users/norm/test/. Seems permission related`

image even the tutorial in a fresh Docker Desktop installation fails…

Estoy siguiendo los pasos para usar Docker y me salta este error al ejecutar el comando : docker build -t captacion-php ./

[+] Building 0.3s (2/2) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 4: unknown instruction: LIBMCRYPT-DEV

¿me echáis una mano? gracias!

I was having the “failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials” issue under Docker Desktop Windows/WSL2.

Running with sudo worked for me.

This may help someone else: The instructions say to make sure you are in the directory “node-bulletin-board/bulletin-board-app” and I was getting the above error when running in “node-bulletin-board”. Changed into the bulletin-board-app child directory and it ran. Naturally I only re-read the doc after trying everything else.

Window 10 Home restart worked for me Screenshot (79)

My issue was regarding the permissions to download the FROM image

I ran the docker build command as following:

sudo docker build -t myapp .

Also the docker file was named ‘Dockerfile’

That worked for me

Renaming credsStore to credStore would be the equivalent to removing the credsStore config (which makes docker skip the credentials-helper, and to store credentials as base64 encoded plain text in the configuration file).

@tonistiigi file name is not the only issue here, or I have just another bug

Here is what I face when running docker build command:

failed to solve with frontend dockerfile.v0: failed to build LLB: failed to load cache key: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-desktop.exe": executable file not found in $PATH, out: ``

Renaming "credsStore": "desktop.exe" to "credStore": "desktop.exe" in ~/.docker/config.json is what helped me actually, but it seems like Docker Destkop keeps adding credsStore entry in that config file

Crazy, this worked for me. Thanks!

Win 10 Pro WSL2 Ubuntu 20.04

I had that issue on my mac as well

Hi, I had the same issue and I could finally solve it by disabling buildkit feature as explained here: https://stackoverflow.com/questions/64382812/docker-has-the-same-error-regardless-of-what-i-try-to-build-windows-10

this worked for me. thanks!

I tried many options but unfortunately didn’t helped, and I realized that my Dockerfile was mistakenly inside /app/src, moved Dockerfile back to root, and it just WORKED!! 💯

FROM node:latest

RUN mkdir -p /app/src

WORKDIR /app/src

COPY package.json .

RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "start"]