Skip to content

[Feature] process docker build outputs instead of just printing them #480

@qwertycxz

Description

@qwertycxz

Problem Description

In build_image, the output of docker build are just print to stdout, making it hard to process by applications.

build_imagedocker build 一股脑输出到了 stdout,上层程序很难对这些输出进行处理。

Proposed Solution

Make print not a bare function, but a callback function which we could determine in BuildConfig.

我想就不要用一个裸的 print 了,可以将其修改成一个回调函数,允许我们在 BuildConfig 中指定。

Affected Component(s)

  • Engine
  • Sandbox
  • Common
  • Tools
  • Documentation
  • Other: ___________

Alternatives Considered

Or we could just using a logger, but there will be concurrent errors:

Step 1/5 : FROM debian:latest   # (FROM TASK A)
Step 1/5 : FROM alpine:latest   # (FROM TASK B)
Step 2/5 : RUN apt-get update   # (FROM TASK A)

也可以直接用 Logger,但会有并发性错误 ↑

Additional Context

A print callback patch is ready.

我已经写好了一个回调函数版的 Patch。

See #481.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions