我们可以控制 .dockerignore 文件中内容的大小写敏感度吗?

Can we control case sensitivity of contents in .dockerignore file?

official documentation 中,我找不到有关 .dockerignore 文件中内容区分大小写的信息。

我们可以控制 .dockerignore 文件中内容的大小写敏感度吗?

例如:我的文件扩展名为 .txt、.TXT、.Txt - 我想单独指定模式。

似乎 .dockerignore 文件在 Windows 上不区分大小写,在 Linux 上区分大小写(因此可能是 MacOS)。

来自Docker documentation

The CLI interprets the .dockerignore file as a newline-separated list of patterns similar to the file globs of Unix shells. [...] Matching is done using Go’s filepath.Match rules. A preprocessing step removes leading and trailing whitespace and eliminates . and .. elements using Go’s filepath.Clean.

上述函数似乎使用了 Go 的 glob, which is case-insensitive or case-sensitive depending on your operating system

今天是 2021 年 9 月 20 日星期一,.dockerignore 文件在 Windows 上似乎区分大小写。我不得不更改我的排除规则之一 !obj\Docker\program*!obj\Docker\Program*

我正在使用 VS 2019(版本 16.11.3)以及 VS Tools for Containers 1.0 和 VS Container Tools Extensions 1.0。