首页 > 解决方案 > 显示 docker build 的日志

问题描述

我有一个要在 WSL 上构建的 Dockerfile。 docker build -t name .导致错误消息,例如ERROR: Command errored out with exit status 128: .. Check the logs for full command output.

为了检查日志,我找到了用于构建我的 Dockerfile 的容器的名称。然而,docker logs NAME返回Error response from daemon: configured logging driver does not support reading。我发现docker inspect NAME"HostConfig": {"LogConfig": {"Type": "none"}}, "LogPath": ""条目。如何解决这个问题并获取我的日志? docker info输出Logging Driver: json-file,这是可取的。

标签: gitdockerwindows-subsystem-for-linux

解决方案


推荐阅读