-
Notifications
You must be signed in to change notification settings - Fork 601
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
[Windows] Fix nerdctl build tar parsing error #3604
base: main
Are you sure you want to change the base?
Conversation
94cff78
to
2d18366
Compare
- Write buildctl output to terminal and tarball to file Signed-off-by: Christine Murimi <[email protected]>
2d18366
to
01db27a
Compare
I need to work through this later, but I'm unclear how the current code works on non-Windows. How do those platforms distinguish a tar file from log output on stdout? They shouldn't be passing through a termInal on the way, the terminal is where nerdctl's stdio is connected, so I don't understand what's different on Windows. |
Hey @TBBle |
Still investigating the issue. This is a temp fix and the PR is WIP (may and may not be the final solution).
|
Deeply confused about this.
This does not make any sense. Now suspecting buildctl might be the problem. |
buildctl "output" goes to stderr. Is it the case on windows?
or
|
PR Description
Linked Issue: containerd/nerdctl#3629
This PR separates output streams for the
buildctl build
command to avoid parsing errors specifically on Windows terminals.The
buildctl build
command sends both TTY logs and tarball (binary) data to stdout, but Windows terminals cannot differentiate between these, causing errors like "archive/tar: invalid tar header." To resolve this, the tarball output is directed to a file, isolating it from TTY output. If a destination tar file is not specified, a default file is created, which is then loaded into the containerd image store.