apache / apache/cloudstack

`.dockerignore`: Use an allowlist approach for selective builds

Open
#12,827 1 comment 0 reactions 0 assignees View on GitHub
docker priority: low
Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
6d 19h
Merged PRs (30d)
32

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with the repository's root .dockerignore, which the issue identifies as outdated, and compare its current patterns with the proposed allowlist example. Verify that the resulting exclusions still permit the selective builds and required paths described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
build-system
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.