Skip to content

docker build --progress=none hides the stderr output of any failing command #6513

@anordal

Description

@anordal

Contributing guidelines and issue reporting guide

Well-formed report checklist

  • I have found a bug that the documentation does not mention anything about my problem
  • I have found a bug that there are no open or closed issues that are related to my problem
  • I have provided version/information about my environment and done my best to provide a reproducer

Description of bug

Bug description

There appears to be no way to hide normal progress output while preserving stderr from failing commands:

  • docker build --quiet .
  • docker build --progress=quiet .
  • docker build --progress=none .

These all output the secondary failure, not the primary failure (see below):

Primary failure

ls: cannot access '/nonexisting': No such file or directory

Secondary failure:

ERROR: failed to build: failed to solve: process "/bin/sh -c ls /nonexisting" did not complete successfully: exit code: 2

Reproduction

  1. To demonstrate, put a failing command in Dockerfile:

    RUN ls /nonexisting

  2. Observe that without --quiet, we see progress, the primary failure and the secondary failure.

  3. Observe that with --quiet (or any of the other options), we don't get to see the primary failure.

The objective is to disable progress output without hiding the primary error output.

Version information

Docker version 28.5.1-ce, build f8215cc26

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions