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

Request: More practical defaults for .dockerignore #5562

Open
mcandre opened this issue Oct 21, 2024 · 0 comments
Open

Request: More practical defaults for .dockerignore #5562

mcandre opened this issue Oct 21, 2024 · 0 comments

Comments

@mcandre
Copy link

mcandre commented Oct 21, 2024

Description

By default, docker builds should exclude common patterns from ADD / COPY directives:

  • *Dockerfile*, including the standard Dockerfile path, as well as any user custom Dockerfile.<extension>, Dockerfile-<extension>, <environment>.Dockerfile, <environment>-Dockerfile, etc. auxiliary configurations
  • Positive matches from git ls-files, including the per-directory .gitignore system and gitignore --global per-user system. The latter is a scalable way to maintain OS and editor specific exclusion patterns, without having to track thousands of these depending on random contributor machine setups. The Go library https://github.com/go-git/go-git can help manage that.
  • Positive matches from ignore configurations in Subversion, Mercurial, Perforce, and other alternative version control systems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant