Docker Ignore File Generator
Generate a .dockerignore locally from editable project presets. Validate common Linux-style patterns and see how the last matching rule affects each supplied context path.
Order Docker Ignore Rules and Exceptions
Docker Ignore File Generator: how to use it
- Choose a project preset and select Load preset, or paste your own ordered rules. Keep exception lines beginning with ! in the order you intend.
- Optionally enter build context paths one per line. Select Check and generate to review syntax issues and the last matching rule for each path.
- Download the ZIP and extract .dockerignore to the build context root, or copy the text into that file. Review Dockerfile-specific ignore files when your build uses one.
Limits and notes
Up to 250 source lines and 100 preview paths. Covers common Linux-style Docker globs with stars, double stars, question marks, bracket sets and escaped punctuation. Normalizes line endings to LF and preserves source rule order, comments and duplicates. Uses supplied path text without inspecting any build directory or Docker daemon.
How your privacy works →Docker Ignore File Generator: common questions
Which exception wins if several rules match the same path?
The last matching rule wins. A matching ! pattern includes the path, and a later matching exclusion can exclude it again.
Does *.md match files in every folder?
It matches Markdown files at the build context root. Use **/*.md to match across directory levels.
Where does the generator save its output?
The ZIP contains a file named .dockerignore. Extract it at the root of the context you send to Docker.