-
Notifications
You must be signed in to change notification settings - Fork 618
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
Error: no image was built #3629
Comments
I am observing the same behavior using the trivial FROM hello-world:latest
RUN echo "hello" My environment:
|
@slonopotamus try running this with |
🎉 It works with |
@iankingori Traced the problem to the I/O reader returned by StdoutPipe() in nerdctl build.goL78C11. Need to do further investigation if this is a nerdctl issue or a buildkit issue. |
It was working in November 2023, but this problem appeared between then and February 2024, per #2587. I don't know if something changed in nerdctl that affected this, or if there was a change in buildkitd. Or maybe both, see the end of #2587 (comment) But that should help give you somewhere to bisect with (although you'd need to backport the PR if you wanted to test nerdctl before that PR was merged. But you could rule old buildkit in or out easily enough.) |
cc @profnandaa Following the buildctl documentation on using output, I run the buildctl commands for each. > buildctl --version
buildctl github.com/moby/buildkit v0.17.0 fd61877fa73693dcd4ef64c538f894ec216409a3
|
If I understand the last post correctly, the first case is the one that is happening underneath the failing
This error comes from buildctl, but only happens if buildctl is directly connected to a terminal, and I expect the same failure on Linux, or with So try redirecting buildctl's stdout and stderr to separate files, which should emulate what nerdctl is doing. If that works, then buildctl is fine and the problem does lie in nerdctl's setup. (Based on the initial error, nerdctl closed the fd connected to buildkit's stdout too early? Weird that
That second case's failure looks like a bug in buildkit; a quick check shows that digest is the Windows nanoserver 10.0.20348.2762 base image, so it should be in the content store already. Might be worth raising as an issue in the buildkit project, and if possible, confirming whether we have the same problem on Linux. (I assume it's not fixed by This last one might be an issue with exporting "foreign"/"non-distributable" layers; that layer is not marked non-distributable anymore, but I recall there was a bug in buildkit or containerd where the "foreign"/"non-distibutable" flags were being conflated with the presence of URLs where the layer could be fetched by HTTP, and I suspect the Windows base images still have the URL metadata even though the layers are no longer flagged foreign/non-distributable... moby/buildkit#2561 (comment) is what I'm thinking of, and it looks like this conflation still exists. I didn't break that comment out into a separate bug report at the time, sadly. (There might also be an issue somewhere else in either buildkit or containerd that this issue is triggering; but we'd have to track that down via buildkit first anyway.) Anyway, see if adding |
@TBBle Everything works fine on Linux. The problem is with Windows using PowerShell/ cmd. |
Test 1 in #3629 (comment) also shows things working correctly on Windows. However, to test the failure case under |
The bug's actually in https://github.com/containerd/console: containerd/console#83 |
Description
PS D:\Test> nerdctl build -t iis-server .
time="2024-04-30T17:10:39+03:00" level=fatal msg="no image was built"
PS D:\Test> error: failed to solve: failed to copy to tar: rpc error: code = Unknown desc = write /dev/stdout: The pipe is being closed.
Steps to reproduce the issue
Describe the results you received and expected
I'm trying to build iis server image on windows containers, and this is the error I recieve.
I'm also very new to containers and the whole conception about them and have no idea how to procced from here
What version of containerd are you using?
latest
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: