Skip to content

Allow exclude section to point at existing ignore file #2265

Open
@nickhammond

Description

Description

Most container-based applications already have a .dockerignore, it'd be great to be able to point to one of these files for the exclude section of your project descriptor.

Proposed solution

  1. Add a file-based reference to the exclude section, something like:
exclude_list = ".dockerignore"
  1. Potentially add a CLI option --exclude_list .dockerignore

Either option would read .dockerignore and utilize that as the exclude option for the pack instead of listing them out.

Describe alternatives you've considered

  1. Open .dockerignore
  2. Copy entire file contents
  3. Create project.toml with base spec and an exclude section
  4. Within the exclude section paste in the lines from your .dockerignore file
  5. Remove all comments and empty lines
  6. Quote each line and turn into a proper array of directives so that it looks something like this:
[io.buildpacks]
exclude = [
  "/.git/",
  ".env"
]
  1. Remember to maintain two ignore/exclude lists, the one in project.toml and the other one in .dockerignore

Additional context

Metadata

Assignees

No one assigned

    Labels

    help wantedNeed some extra hands to get this done.status/readyIssue ready to be worked on.type/enhancementIssue that requests a new feature or improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions