-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Failed to compute cache key in newer version #1939
Comments
Expiriencing the same thing, any update? |
Same issue here. Experiencing the issue using both |
Same issue with |
Here's another example: FROM python:3.8-slim-buster as base
COPY --from=hairyhenderson/gomplate:v3.8.0 /gomplate /usr/local/bin/gomplate
COPY --from=bitnami/kubectl:1.20 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/kubectl
COPY --from=argoproj/argocli:v2.12.8 /bin/argo /usr/local/bin/argo This seems to work with two but not three of them (!). As above, only on buildkit.
|
Also experiencing this issue with buildkit. Without buildkit, builds fine. |
when will this fix land in docker for mac? |
docker for mac update check says that 3.1.0 is the latest, but the latest is 3.2.0 |
Docker for mac 3.2.0 has docker engine v20.10.3, the fix for this issue is included with docker v20.10.4 so you'll need to wait until the next release. |
I'm on 20.10.5 on mac and still running into this issue. |
same here |
Seems to be resolved for me on both Windows/Linux. Maybe create a new issue with an example if you are still having issues. |
I'm experiencing the exact same issue |
A brand new VS solution today breaks with "not found" in the path. |
I'm in the same boat -- running into the same issue. |
Hello I am also facing the same issue here.. Is there any fix for this please..
failed to compute cache key: "/target/employee-jdbc-0.0.1-SNAPSHOT.jar" not found: not found Thanks |
@thaJeztah I see this issue is closed but many people are still expiriencing the issue. It is because the fix is not rolled out yet, or is it because the problem is still not solved? |
I'm not sure if this fixes it for you: https://stackoverflow.com/a/66611529/554037 Try running:
|
Disable buildkit works for me. DOCKER_BUILDKIT=0 docker build ... |
I'm using version 20.10.5 of the Docker Engine on a Windows machine and I'm seeing this error using a very basic Dockerfile. Any updates? |
This flag helped me to get the real error and then I solved it from there when using
Without flag (original error):
|
Windows 20.10.5 users, here is how I fixed it:
Cheers. |
It looks like Docker for [Mac, Windows] have some crippling regressions in buildkit. As far as I can tell, they are using a build version greater than this fix and also #1159 which ends up making it very difficult to build anything non-trivial using caching. |
|
Docker Desktop on windows v.3.3.1 (63152), Engine 20.10.5 also still has this issue |
I don't have this issue anymore with my original reproduction above, so I would recommend creating a new issue. |
Any update on this, it is happening on my 20.10.6 (OSX) version as well... |
still a bug |
In my case it "failed to walk" because I was copying resources from outside the root folder (where we build the Dockerfile).
|
still a bug on mac catalina v10.15.7 |
Make sure that the file that you are trying to copy is not part of the |
@simibac thanks, resolved my issue! |
This actually worked! I had the following structure:
Running on Ubuntu 20.04LTS on WSL on Windows 10 (20H2), the following command got the build done |
Echoing #1939 (comment) and #1939 (comment) above:
With buildkit:
Without buildkit:
|
In my case issue was file was in the |
Docker for desktop 3.5.2(66501) on windows 10 still has this issue. |
You're genius ! |
100% this was the case for me. Thank you! |
After lot of struggling, able to get it work. Not because of .dockerignore (i don't have this file), but cos of the slash Not working Working Do note that my host machine is windows, 10 pro. Why would / works, and not \ , until now its still a mystery to me. |
@hanct probably because your base image (FROM ...) of your Dockerfile is unix-based. And on unix systems back-slashes ( \ ) is not the norm. That is a fundamental difference between windows systems and unix systems. So just adapt your dockerfile so it can reach sub folders using regular slashes |
Another reason might be (which is what I thought when I was trying something similar, albeit when mounting volumes), that backslashes are usually used to escape the following character, which is why it might have worked if you used two backslashes ( However what @ksuedile says is definitely correct: on unix-based machines path levels are usually separated by a slash ( |
Yes. I am using linux distro as basic layer. The reason why i initially thought backslash can be used, is because I am running these docker commands using windows command prompt of my host machine (which is window), and hence never thought that the slash in these commands must follow the container's base layer OS, not the host OS |
On Mac and this did it for me 👌 |
I removed **/bin from FROM mcr.microsoft.com/dotnet/aspnet:5.0 COPY ["ChatApp/bin/Release/net5.0/publish", "App/"] WORKDIR /App |
On the Mac, keeping absolute paths made it work for me: cd /absolute/path/to/project/folder MacOS Big Sur 11.5.2 Apple M1 |
On Mac Big Sur 11.2.3 , deleting the dockerignore solved the problem. |
I did not really want to try this ;) but works here, too (of course it introduces other problems). Absolute paths did not make any change though. |
Creating an empty .dockerignore worked for me |
I'm on MacOS docker engine v20.10.11 I Tried the following, but nothing helps.
Can anyone tell how to fix it or on which version, it was working perfectly?
|
@mhtsharma948 paths in Dockerfiles are relative to, and must be within the build-context (if you run From your output I suspect you were trying to use an absolute path on your computer, which is not supported, and is not a bug. If you (and others on this thread) think there's a bug at hand, and have exact steps to reproduce, pleas open a new ticket instead with details and steps to reproduce. |
I am locking the conversation on this ticket, because it's collecting many comments that are unrelated to the original issue, but wrote down some pointers in another ticket that may help understanding the error messages that can happen when performing a build; docker/buildx#415 (comment) |
This is a docker issue but it seems to be related to BuildKit only. this is something that was still working in docker
~19.03.10
but stopped functioning in20.10.0+
. I managed to bring down my DockerFile to a minimal repro:This works (A.DockerFile):
This also works (B.DockerFile):
This no longer works (C.DockerFile):
Output from running A and C after eachother:
This doesn't happen consistently in my build, sometimes everything builds fine and there are no issues.
I'm using windows 10 (20H2) and the latest version of Docker Desktop that includes
Docker version 20.10.2, build 2291f61
, but I have also seen this happen on Linux with the same versionThe text was updated successfully, but these errors were encountered: