Generate a .dockerignore file online
Generate a .dockerignore file based on your project type, right in your browser.
Reduces the Docker build context size and avoids copying sensitive files (.env).
🔒 100% client-side — no data sent
Pick your project type and generate a tailored .dockerignore file in one click. Generation happens 100% in your browser with no data sent online. You exclude unnecessary files for lighter Docker images and faster builds.
What is it for?
- ▸ Exclude node_modules and build files from a Docker image
- ▸ Create a .dockerignore tailored to a Node, Python or Java project
- ▸ Shrink the build context to speed up docker build
- ▸ Avoid copying sensitive files like .env into the image
FAQ
What is a .dockerignore file for?
It tells Docker which files and folders to exclude from the build context, such as node_modules or temporary files. This lightens the final image and speeds up the build.
What is the difference between .dockerignore and .gitignore?
.gitignore controls what is versioned in Git, while .dockerignore controls what is sent to the Docker daemon during the build. They serve distinct purposes even though their contents often overlap.
Should I ignore the .git folder in .dockerignore?
Yes, it's recommended to exclude the .git folder because it's not needed in the image and bloats the build context. The templates generated by the tool include it by default.