[Bug]: container build -q hangs indefinitely
I have done the following
- [x] I have searched the existing issues
- [x] If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
Starting state: container 1.5.0 installed from the release package, system
services running (container system start), builder started by the first build.
No custom configuration.
- Create a minimal build context:
mkdir -p /tmp/qhangprintf 'FROM fedora:44\nRUN echo hi > /x\n' > /tmp/qhang/Containerfile - Build in quiet mode:
container build -q --no-cache -t qhang:latest /tmp/qhang - The command produces no output and never exits. It has to be interrupted (Ctrl-C / SIGTERM).
- For comparison, the same build without
-qcompletes:container build --progress plain --no-cache -t qhang:latest /tmp/qhang
Reproducibility: always, on every build that executes a RUN step.
--no-cache is only there to make sure the RUN step executes. A fully
cached build may finish because it produces no output.
Problem description
Current behavior: container build -q hangs with no output and no error
whenever the build produces output. Interrupting it prints
Error: interrupted: "exiting on signal 15". The builder log
(container logs buildkit) stops after the "resolve exporter" line.
Expected behavior: the build completes like it does without -q, printing
only the image reference.
Likely cause: in quiet mode BuildStdio.handle
(Sources/ContainerBuild/BuildStdio.swift) returns before sending the ack
that the builder shim waits for after every IO packet (StdioProxy.Write →
Request in container-builder-shim 0.13.1). The first chunk of build output
therefore blocks forever. Moving the quiet check so the ack is always sent
fixes it locally.
Environment
- OS: macOS Golden Gate 27.0.1
- Xcode: Xcode 26.6 Build version 17F113
- Container: container CLI version 1.5.0 (build: release, commit: d265d66). Builder shim 0.13.1.
Code of Conduct
- [x] I agree to follow this project's Code of Conduct