Production-ready .dockerignore files for 87+ languages, frameworks, and tools.
Docker sends the entire build context to the daemon. A proper .dockerignore strips secrets, artifacts, caches, and editor files — making builds faster, leaner, and secure.
# Framework template (self-contained, includes security)
curl -o .dockerignore https://raw.githubusercontent.com/ronald2wing/.dockerignore/master/frameworks/react.dockerignore
# Language template + security (language templates omit security patterns)
curl -o .dockerignore https://raw.githubusercontent.com/ronald2wing/.dockerignore/master/languages/python.dockerignore
curl -s https://raw.githubusercontent.com/ronald2wing/.dockerignore/master/common/security.dockerignore >> .dockerignore
# Interactive builder: https://dockerignore.com| Category | Directory | Description |
|---|---|---|
| Framework | frameworks/ |
Self-contained. Security first. Use standalone. |
| Language | languages/ |
Language patterns only. Combine with common/. |
| Common | common/ |
Cross-cutting: security, cache, logs, git, Docker. |
| Tool | tools/ |
Build tools: webpack, vite, esbuild, etc. |
| IDE | ides/ |
Editor configs: VS Code, IntelliJ, vim, etc. |
| OS | os/ |
OS temp/system files: Linux, macOS, Windows. |
# Language + common modules
cat languages/python.dockerignore common/security.dockerignore common/cache.dockerignore > .dockerignore
# Deduplicate when combining
cat languages/node.dockerignore common/security.dockerignore common/git.dockerignore | sort -u > .dockerignore
# Full stack: framework + OS + IDE (deduplicate with sort -u)
cat frameworks/nextjs.dockerignore os/linux.dockerignore ides/visual-studio-code.dockerignore | sort -u > .dockerignore- Security — Including
.envfiles in an image leaks credentials. Every framework template puts security first. - Build speed — Excluding
node_modules/,target/, and.git/shrinks the build context from hundreds of MB to kilobytes. - Cache efficiency — Fewer files means fewer cache invalidations and faster rebuilds.
See CONTRIBUTING.md for the PR process and TEMPLATE_STANDARDS.md for the specification every template must follow.
- Website: dockerignore.com
- Repository: github.com/ronald2wing/.dockerignore
- Issues: GitHub Issues
- License: MIT