Skip to content

.dockerignore: Use an allowlist approach for selective builds #12827

Description

@jbampton

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions