`.dockerignore`: Use an allowlist approach for selective builds
未关闭
docker
priority: low
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.4k
- 平均合并
- 6 天 19 小时
- 30 天内合并 PR
- 32
描述
For very selective builds, a robust strategy is to ignore everything by default (*) and then use the negation pattern (!) to explicitly include only the necessary files or directories.
Example:
```
# Ignore everything
*
# Include only what's needed
!src/
!package.json
!package-lock.json
```
Seems it has not been updated for 8 years:
https://github.com/apache/cloudstack/blob/main/.dockerignore
贡献指南
调研方向
从仓库根目录中的 .dockerignore 开始,issue 指出该文件已过时,并将其当前模式与提议的 allowlist 示例进行比较。验证所得的排除项仍允许 issue 中描述的选择性构建和所需路径。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- docker
- 领域
- build-system
- Issue 类型
- 重构
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100