-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'docker build' error: "failed to solve with frontend dockerfile.v0" #415
Comments
Thanks for the report, moving to buildx repository. |
Please post |
@tonistiigi my docker version is: Also, by reproducer, do you mean a reproducible example? And for the daemon logs you suggested, I'm not sure if I have been able to locate them correctly. I followed the advice here on where to find them (on my Windows it was under I looked through the log.txt file but I couldn't find anything helpful. Is this the correct file? And did I miss something important within it? |
I noticed this as well with the same version after the update. Fixed after I purged the settings and restarted. |
Name the file Dockerfile exactly. I got the same error because i named it DockerFile |
changing name 'Dockerfile' from 'dockerfile' also worked for me |
@UlasKasim @ArifIstaka the name of the file is already capitalized. @Muqito Can you clarify a little bit on how you "purged the settings and restarted." Thanks! |
@nromagno Sure thing. Click on this little bug icon up to the right, and then you'll see the following settings: I think I might have also reset to factory settings. Not sure though |
@Muqito I purged the data and restarted as you described, but unfortunately the same error still appears. |
@stephen-turner, @tonistiigi, @nromagno, Good afternoon! I am new to Docker. I try to run the image and container based on it by reading the Microsoft documentation step by step: So do I not understand something due to lack of experience, or is there really some problem?
|
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. |
Same here. Visual Studio debugging with Docker works fine. Output window shows: |
This may help someone else: |
Simply change name of "dockerfile" to "Dockerfile" and then build, it works for me. |
These reports seem to be unique for windows. Afaics NTFS is a case-sensitive filesystem so I'm not sure how having Dockerfile in the wrong case producing an error could be a regression and not just an expected result. If someone can show the exact reproduction steps that show something that previously worked not working anymore in buildx it is possible we could do something about it or improve documentation. edit: reading some more, apparently case-sensitivity is optional in NTFS (and some modern Windows don't use NTFS anymore). Assuming that is the underlying issue some investigation needs to be made why it worked previously (if it is a regression). It think it may be possible to have some exception to keep it working in buildx. |
I don't know if it's a regression from old build, but I would say that it's highly unexpected for |
Same here: |
It's not too unexpected as I'm 99% sure that if you would just create a tarball of your build context and send it to the daemon (simplified version on how the API works) it would fail with any version of the builder. There is some preprocessing specifically for this file and that's why the casing is masked. For any other file referred to in Dockerfile no such exception exists as well. These are all linux container builds that are referred here and (common) Linux filesystems are case sensitive. |
Same here: |
The solution is in #415 (comment) |
The Dockerfile is named "Dockerfile". I have also tried purging and restarting but the issue persists. |
@tonistiigi file name is not the only issue here, or I have just another bug Here is what I face when running 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 edit by @tonistiigi : please see #415 (comment) before following this advice |
@llwydsj can you expand a little bit on your comment and the how you suggested to resolve this issue? I'm not familiar with Visual Studio, so how could I check if my issue also arises from case sensitivity. Thanks! |
I did some digging and it turned out this was not even caused by the case-sensitivity of the filesystem. There is a special fallback moby/moby#10858 that allows name I've provided patches in buildx #444 and also in Dockerfile frontend in Buildkit moby/buildkit#1816 to maintain compatibility. Only one of them is needed to have the old behavior back. |
Rename dockerfile to Dockerfile. Doing this fixed my issue. |
It only appears to only break if I attempt to cross-build for an architecture such as armv7 or anything that isn't x86/64 |
I had that issue on my mac as well |
on macOS renaming "DockerFile" to "dockerfile" fixed the problem for me. |
My file was named "Dockerfile" and building only for amd64 with the default build system worked fine. When I used buildx to build for a different architecture it would error out. |
Another situation that I encountered was that dockerfile:
error:
The solution was to add |
Crazy, this worked for me. Thanks! Win 10 Pro WSL2 Ubuntu 20.04 |
No such thing as |
Renaming |
restarting docker worked for me |
Deleting docker config file from inside WSL2 Ubuntu shell fixed it for me:
I'm using Windows 10. |
My issue was regarding the permissions to download the FROM image I ran the docker build command as following:
Also the docker file was named 'Dockerfile' That worked for me |
Well, docker message is confusing. Instead of explaining message like "No Dockerfile found, looked at current working directory /foo/bar" on my [+] 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 |
For anyone stumbling across this issue on mac... I just deleted |
@mariusdkm could you open a new ticket for that? |
Great..
|
@JesielPalacios looks unrelated; from the error it looks like you don't have permissions to read a file in your build context;
see #415 (comment)
|
@thaJeztah Mm.. i think that's weird, cause i'm working like administrator user and just trying to deploy an Angular App using the Multi-Stage Build feature from Docker. |
If you're working on wsl2 environment this worked for me: |
@mariusdkm life saver! thank you. |
This was my issue as well. Running Docker Desktop on WSL2. I just changed
|
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. |
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 ¿me echáis una mano? gracias! |
If i run docker build with build kit (DOCKER_BUILDKIT=1 docker build -t base .), the error occurs. |
in my case adding tag after image name resolved the issue. |
There's a problem with your Dockerfile; maybe some of the Dockerfile-specific lines contain illegal words. for example, you may have a line like this: |
Please note at which build stage the error was reported |
For me none of the above helped, but to repeat the |
I am locking the conversation on this ticket, because it's collecting many comments that are unrelated to the original issue, but let me describe some steps that may help users arriving here. Reading the errors produced during buildThe error messages returned by current versions of Docker when using BuildKit can be rather verbose, and many will start with the same prefix ( If you get such an error, be sure to read the whole error message; the underlying error is usually at the end. Some examples from the discussion above; Example 1
The above error can be split to:
Where Example 2
Here, the underlying error is Example 3
Here, Example 4
The Example 5
Here the error looks to be on the "client" (cli) side: the docker / buildkit daemon requested the CLI to send a file, but the user running the client did not have access to the file or directory. Note that filesystem errors (e.g. "Access is denied") may differ between operating systems, and the error message can sometimes be somewhat misleading; they should give you a starting point to debug (and hopefully solve) what's wrong in your situation though. Example 6
This error is a syntax error in the Dockerfile; make sure you didn't miss (for example) a line-continuation ( But these errors are so hard to read!Yes, some of these errors are horrible; they're often too verbose and while the extra information may help us to find in what part / subsystem of the build process the error is occurring, they can be daunting for users. We're looking at improving these errors to make the more readable. For example: moby/moby#42329 (comment) shows an improved error message when using Buildx;
But further improvements will still be made. I hope the above helps users that run into errors to narrow down the cause. If you run into an issue, and still think there's a bug, feel free to open a new ticket, but (as may be clear from the above) make sure to include details about the issue, and provide the exact steps to reproduce (taking into account that maintainers of this project do not have access to your private GitHub and Docker Hub repositories). |
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:
Information
Docker version is:
Windows Version: Windows 10 Home, version 1909
And
docker run hello-world
does work as expected: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!
The text was updated successfully, but these errors were encountered: