docker / docker/buildx

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

Open
#3,217 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement status/triage
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are named in the issue. Start by tracing the existing BUILDKIT_PROGRESS and --buildkit_progress handling, then define the supported output targets and synchronization behavior; done means build commands can direct output to the proposed destinations without invocation workarounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, dockerfile, go
Domain
build-system, cli, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.