在上下文目录中,可以创建 .dockerignore 文件(类似于 .gitignore 文件),防止在 Build Context 中的某些文件被传到 Docker Server 中。
该文件中的匹配模式规则采用 Go 语言中的 filepath.Match() 函数。
参考文献
Do not ignore .dockerignore (it’s expensive and potentially dangerous)
在上下文目录中,可以创建 .dockerignore 文件(类似于 .gitignore 文件),防止在 Build Context 中的某些文件被传到 Docker Server 中。
该文件中的匹配模式规则采用 Go 语言中的 filepath.Match() 函数。
Do not ignore .dockerignore (it’s expensive and potentially dangerous)