-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Feature: improve debugging of COPY failures #2690
Comments
Thanks for reporting; I recently made some minor changes to the "classic" builder to somewhat improve the error message (see moby/moby#41327); with those changes (not yet in a release) the same error would look like; COPY failed: file not found in build context or excluded by .dockerignore: stat bin/date.out: file does not exist So with that change, the obscure "/var/lib/docker/tmp/docker-builder394713048/" path (which is the temp-directory on the daemon side) is omitted, and the error makes a mention of Unfortunately, detecting if the file is missing because it's excluded (through BuildKit will need a similar fix, but from the discussion on that ticket, it might be possible to detect that a file/directory was excluded by .dockerignore, so that a more useful message can be presented. That said; there's other things to improve around |
@thaJeztah is this issue in DockerCli or would be in moby? if yes I would really love to work on it, Thanks. |
I think this will be in buildkit; moby/buildkit#1647 |
Are inputs and pointers available for it? if yes I would like to work on it. |
Description
Runing
docker build
does not provide enough detail for debugging COPY failures. Requesting a feature to help debugging.For example, this is a common issue as noted by 200+ upvotes on stackoverflow: https://stackoverflow.com/a/36028733/1865272
Steps to reproduce the issue:
Describe the results you received:
The output is:
Note that the output from -D doesn't help either.
Describe the results you expected:
If copy fails to find anything, I'd like it to check without the ignore rules and emit something like:
"Warning: Your .dockerignore prevented these files from copying: bin/date.out"
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Windows 10 running WSL2 with Ubuntu 18.04
The text was updated successfully, but these errors were encountered: