Skip to content

Ability to write output to a file and or console without changes to invocation or workrounds #3217

@the-moog

Description

@the-moog

Description

Currently you can simplify or disable build output using host environment variable BUILDKIT_PROGRESS or switch --buildkit_progress.

In CI only logging is needed as nobody is looking.

Interactively no output is produced unless you use the 'plain' setting, then any build progress detail is lost.

Most OS support directly writing to file handles and/or named pipes.

You can't have build stages writing directly to the console as the cursor is moving all over the place while running
multiple parallel stages. Some synchronisation is needed, e.g. after a stage is complete or in a separate output panel on the console.

Suggestion:
Have buildx expose named pipes such as console, logfile, \dev\whatever and/or file handles like 10, 20.

Then it can manage the serialisation of the console or file output to handle and synchronise with the parallel operations.

Currently this does nothing

RUN echo "Working...."

With the above suggestion syntax like this would be possible.

RUN echo "Working...." >buildx/console
RUN echo "Completed" >&10
COPY --redirect-stdout=buildx/build_log results /dev/console
COPY --from=test_run buildx/build_log

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions