Closed erbzn closed 3 years ago
Have you tried with the --quiet option?
I belive Buidlah and Docker build always write progress information to stderr and only write the image id to stdout.
Thank you for the fast answer.
If I run Docker build for the mentioned Dockerfile nothing is written to stderr. If I run Buildah with the --quiet option still some lines are written to stderr:
[root@docker-desktop phippyandfriends]# buildah bud --quiet phippy/. > stdout.txt 2> stderr.txt
[root@docker-desktop phippyandfriends]# cat stdout.txt
ec18b5036cfc029125e425d3c4526bc38cd6efcbd9fac451f2e5456f9e562dc4
[root@docker-desktop phippyandfriends]# cat stderr.txt
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
And as there is the configuration option failOnStderr: true
in Azure DevOps Pipeline the successful build is marked as failure.
Ok that is a bug.
Tested the fix in #2942 out and @erbzn looks like there is an issue in the composer install
step in the phippy container file, that step writes to stderr instead of stdout. Verified with various other containerfiles and we always write to stdout now with the fix.
@erbzn you can use the --quiet
flag to suppress any output to stderr. A mentioned in https://github.com/containers/buildah/issues/2423#issuecomment-768358187, there is an issue with the process running in your container that writes to stderr. Closing as this is not a bug.
@umohnani8 Does that mean Buildah is suppressing the output of the docker container's stderr? Since I see no errors in the buildah output other than printing the steps as stderr.
Description
I am trying to use Buildah in Azure DevOps Pipeline with the example repository phippyandfriends (https://github.com/Azure/phippyandfriends). First step is to build phippy image. This image build fails with "buildah bud", as it writes some standard output to standard error, e.g.
Copying blob sha256:df20fa9351a15782c64e6dddb2d4a6f50bf6d3688060a34c4014b0d9a752eb4c
. I am using a self-hosting agent built from the buildah image "quay.io/buildah/stable:latest" and configured to connect to Azure DevOps agent pool with the following Dockerfile (start.sh connects to agent pool):Within this Container I want to build the following image:
I've tested with 2 versions of buildah (1.14.9, 1.16.0-dev), everytime it is writing parts to stderr but the build does not fail. Pushing and running built image works as normal afterwards.
Steps to reproduce the issue:
docker run -it --net=host --security-opt label=disable --security-opt seccomp=unconfined --device /dev/fuse:rw quay.io/buildah/stable:latest /bin/bash
git clone https://github.com/Azure/phippyandfriends.git
buildah bud phippy/. > stdout.txt 2> stderr.txt
Describe the results you received:
Describe the results you expected: Only stdout is writing log, as image build is successful.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
: Tested with 2 versions:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: