Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows Docker生成的彩色消息不可读_Windows_Docker_Build - Fatal编程技术网

Windows Docker生成的彩色消息不可读

Windows Docker生成的彩色消息不可读,windows,docker,build,Windows,Docker,Build,我正在Windows 10上使用“docker build”构建asp net核心web应用程序映像。但是,自上次更新以来,消息的颜色变得无法读取。在互联网上搜索没有提供任何答案。 有什么办法可以解决这个问题吗? 使用docker,您可以将--help选项传递给命令以查看用法。例如: $ docker build --help Usage: docker build [OPTIONS] PATH | URL | - Build an image from a Dockerfile Opt

我正在Windows 10上使用“docker build”构建asp net核心web应用程序映像。但是,自上次更新以来,消息的颜色变得无法读取。在互联网上搜索没有提供任何答案。
有什么办法可以解决这个问题吗?
使用docker,您可以将
--help
选项传递给命令以查看用法。例如:

$ docker build --help

Usage:  docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

Options:
      --add-host list           Add a custom host-to-IP mapping (host:ip)
      --build-arg list          Set build-time variables
      --cache-from strings      Images to consider as cache sources
      --disable-content-trust   Skip image verification (default true)
  -f, --file string             Name of the Dockerfile (Default is 'PATH/Dockerfile')
      --iidfile string          Write the image ID to the file
      --isolation string        Container isolation technology
      --label list              Set metadata for an image
      --network string          Set the networking mode for the RUN instructions during build (default "default")
      --no-cache                Do not use cache when building the image
  -o, --output stringArray      Output destination (format: type=local,dest=path)
      --platform string         Set platform if server is multi-platform capable
      --progress string         Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
      --pull                    Always attempt to pull a newer version of the image
  -q, --quiet                   Suppress the build output and print image ID on success
      --secret stringArray      Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
      --squash                  Squash newly built layers into a single new layer
      --ssh stringArray         SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|<id>[=<socket>|<key>[,<key>]])                                                                                                                     
  -t, --tag list                Name and optionally a tag in the 'name:tag' format
      --target string           Set the target build stage to build.
或者在
/etc/docker/daemon.json
中配置默认值:

{
  "features": {"buildkit": false }
}

但是,经典构建器不支持将功能添加到buildkit中,并且不太可能看到更多的发展。

Thx很多,很有效。我确实读过文件,但可能我忽略了这一点。这似乎是一个秘密……我的终端上没有蓝色背景,但我有一个稍微透明的背景,因此我发现蓝色的下一个几乎不可读,即使实际的终端背景颜色是黑色。我可以做
--progress plain
,但是我放弃了我喜欢的其他tty特性。同样,我们的构建脚本执行
docker构建
是源代码管理的,因此要添加该开关,我必须修改一个源代码管理的文件,然后确保我不提交该更改。我真希望只有一个环境变量可以设置为与开关具有相同的效果:耸耸肩:@AdamParkin你也可以禁用buildkit,但我不建议这样做。我还通过将stdin/stdout/stderr调整为非终端,使buildkit恢复到默认的普通模式。不确定是否有更干净的方法:
docker build&1 | cat
{
  "features": {"buildkit": false }
}