我正在使用 Google Cloud build 来构建我的项目,但我想不出一种方法来使 Docker 的输出静音,同时它正在拉取图像以用于给定的构建步骤。例如,假设我有一个cloudbuild.yaml
像这样的文件:
steps:
- name: 'gradle:6.6.1-jdk11'
entrypoint: bash
args:
- -c
- |
echo "bla"
当我运行此构建时,构建步骤的前 40(!)行包括:
Starting Step #0
Step #0 - "Build & push container": Pulling image: gradle:6.6.1-jdk11
Step #0 - "Build & push container": 6.6.1-jdk11: Pulling from library/gradle
Step #0 - "Build & push container": 5d9821c94847: Pulling fs layer
Step #0 - "Build & push container": a610eae58dfc: Pulling fs layer
Step #0 - "Build & push container": a40e0eb9f140: Pulling fs layer
Step #0 - "Build & push container": 1854bb447e96: Pulling fs layer
Step #0 - "Build & push container": efdba649c66e: Pulling fs layer
Step #0 - "Build & push container": 5541276c408d: Pulling fs layer
Step #0 - "Build & push container": 38817ec8e266: Pulling fs layer
Step #0 - "Build & push container": db18551b94a0: Pulling fs layer
Step #0 - "Build & push container": 1854bb447e96: Waiting
Step #0 - "Build & push container": efdba649c66e: Waiting
Step #0 - "Build & push container": 5541276c408d: Waiting
Step #0 - "Build & push container": 38817ec8e266: Waiting
Step #0 - "Build & push container": db18551b94a0: Waiting
Step #0 - "Build & push container": a610eae58dfc: Verifying Checksum
Step #0 - "Build & push container": a610eae58dfc: Download complete
Step #0 - "Build & push container": a40e0eb9f140: Verifying Checksum
Step #0 - "Build & push container": a40e0eb9f140: Download complete
Step #0 - "Build & push container": 5d9821c94847: Verifying Checksum
Step #0 - "Build & push container": 5d9821c94847: Download complete
Step #0 - "Build & push container": 1854bb447e96: Verifying Checksum
Step #0 - "Build & push container": 1854bb447e96: Download complete
Step #0 - "Build & push container": 5541276c408d: Verifying Checksum
Step #0 - "Build & push container": 5541276c408d: Download complete
Step #0 - "Build & push container": efdba649c66e: Verifying Checksum
Step #0 - "Build & push container": efdba649c66e: Download complete
Step #0 - "Build & push container": 38817ec8e266: Verifying Checksum
Step #0 - "Build & push container": 38817ec8e266: Download complete
Step #0 - "Build & push container": db18551b94a0: Verifying Checksum
Step #0 - "Build & push container": db18551b94a0: Download complete
Step #0 - "Build & push container": 5d9821c94847: Pull complete
Step #0 - "Build & push container": a610eae58dfc: Pull complete
Step #0 - "Build & push container": a40e0eb9f140: Pull complete
Step #0 - "Build & push container": 1854bb447e96: Pull complete
Step #0 - "Build & push container": efdba649c66e: Pull complete
Step #0 - "Build & push container": 5541276c408d: Pull complete
Step #0 - "Build & push container": 38817ec8e266: Pull complete
Step #0 - "Build & push container": db18551b94a0: Pull complete
Step #0 - "Build & push container": Digest: sha256:c40a882448431c71719d33939ee5418db2333e3380e9940f632cdb597d230dcc
Step #0 - "Build & push container": Status: Downloaded newer image for gradle:6.6.1-jdk11
Step #0 - "Build & push container": docker.io/library/gradle:6.6.1-jdk11
这是我不需要的信息,我想关闭pull
进程的日志记录,但我找不到任何配置选项可以这样做。