Dockerignore Generator
Pick the stacks in your image, add any custom patterns, and copy a clean .dockerignore that shrinks your build context and keeps secrets, caches and VCS data out.
How to generate a .dockerignore
- Select the stacks your project uses, such as Node or Python.
- Add any custom patterns you want excluded from the build context.
- Copy the generated .dockerignore into the same folder as your Dockerfile.
Examples
Node and Python combined
stacks: node, python
# Node node_modules npm-debug.log ... # Python __pycache__ *.pyc venv ...
Frequently asked questions
Why use a .dockerignore?
It tells Docker which files to leave out of the build context. A smaller context means faster builds and avoids copying secrets, logs and local caches into your image.
How does deduplication work?
Patterns shared by more than one stack are written only once, under the first stack that introduces them, so the file stays clean and easy to read.
Should I ignore the Dockerfile itself?
The General preset excludes the Dockerfile and .dockerignore because they are not needed inside the image. Remove those lines if your build copies them in on purpose.
Does .dockerignore use the same syntax as .gitignore?
The patterns look similar but the rules differ slightly. Docker matches against the build context root and supports a leading exclamation mark to re-include files.
Is my configuration private?
Yes. The file is built entirely in your browser and nothing is uploaded.
Related tools
Dockerfile Generator
Generate a clean, idiomatic Dockerfile for Node, Python, Go, Rust, PHP, Ruby or static sites. Pick your options, then copy or download the file.
Gitignore Generator
Build a .gitignore from Node, Python, Java, Go, Rust, macOS, Windows and more. Pick your stacks, copy or download the file. Runs in your browser.
Docker Compose Generator
Build a valid docker-compose.yml in your browser. Add services, pick Postgres, MySQL, Redis, Mongo or Nginx presets, then copy or download the file.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.