Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow exclude section to point at existing ignore file #2265

Open
nickhammond opened this issue Sep 22, 2024 · 0 comments
Open

Allow exclude section to point at existing ignore file #2265

nickhammond opened this issue Sep 22, 2024 · 0 comments
Labels
help wanted Need some extra hands to get this done. status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.

Comments

@nickhammond
Copy link

Description

Most container-based applications already have a .dockerignore and a .gitignore file, 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

@nickhammond nickhammond added status/triage Issue or PR that requires contributor attention. type/enhancement Issue that requests a new feature or improvement. labels Sep 22, 2024
@natalieparellano natalieparellano added status/ready Issue ready to be worked on. help wanted Need some extra hands to get this done. and removed status/triage Issue or PR that requires contributor attention. labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need some extra hands to get this done. status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

No branches or pull requests

2 participants