将BuildKit与Docker结合使用时,如何查看RUN命令的输出? [英] When using BuildKit with Docker, how do I see the output of RUN commands?

查看:163
本文介绍了将BuildKit与Docker结合使用时,如何查看RUN命令的输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 DOCKER_BUILDKIT = 1 构建Docker映像时,会有一个非常酷的进度指示器,但没有命令输出.如何查看用于调试构建的命令输出?

When building Docker images with DOCKER_BUILDKIT=1, there is a very cool progress indicator but no command output. How do I see the command output to debug my build?

推荐答案

您是否尝试过-progress = plain ?

示例:

FROM alpine
RUN ps aux

DOCKER_BUILDKIT = 1 docker build --progress = plain -t test_buildkit的相对输出.:

#5 [2/2] RUN ps aux
#5       digest: sha256:e2e4ae1e7db9bc398cbcb5b0e93b137795913d2b626babb0f148a60017379d86
#5         name: "[2/2] RUN ps aux"
#5      started: 2019-04-19 09:02:58.922035874 +0000 UTC
#5 0.693 PID   USER     TIME  COMMAND
#5 0.693     1 root      0:00 ps aux
#5    completed: 2019-04-19 09:02:59.721490002 +0000 UTC
#5     duration: 799.454128ms

这篇关于将BuildKit与Docker结合使用时,如何查看RUN命令的输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆