skills/dockerignore-generation/SKILL.md
Generate ecosystem-specific .dockerignore files to reduce build context size and prevent secret leaks. Use when no .dockerignore exists, when the build context is large, or when secrets may be leaking into images.
npx skillsauth add nixopus/agent dockerignore-generationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Without a .dockerignore:
node_modules (hundreds of MB), .git history, and local env files.env files get copied into the image and are extractableEvery .dockerignore should include:
.git
.gitignore
.env
.env.*
!.env.example
!.env.sample
*.md
!README.md
LICENSE
docker-compose*.yml
.dockerignore
Dockerfile
.vscode
.idea
.cursor
node_modules
.next
.nuxt
.output
dist
build
.cache
coverage
.nyc_output
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.turbo
.vercel
.netlify
storybook-static
__pycache__
*.pyc
*.pyo
*.egg-info
.eggs
.venv
venv
env
.tox
.pytest_cache
.mypy_cache
.ruff_cache
htmlcov
*.cover
vendor/
*.test
*.out
bin/
tmp/
target/
*.rs.bk
target/
build/
.gradle/
*.class
*.jar
!*.jar # if copying JARs intentionally, remove this line
.settings/
.classpath
.project
vendor/bundle
.bundle
log/
tmp/
coverage/
spec/reports
vendor/
storage/logs/
storage/framework/cache/
storage/framework/sessions/
storage/framework/views/
bootstrap/cache/
_build/
deps/
.elixir_ls/
cover/
bin/
obj/
*.user
*.suo
packages/
package.json, go.mod, requirements.txt, etc.)test/ or tests/ or __tests__/ exists: add test directories.github/ exists: add .github/.dockerignore at the project root!.env.example negates the .env.* exclusion — keep example env files so Dockerfile can reference them.dockerignore is relative to the build context root, not the Dockerfile locationbuild.context changes what .dockerignore applies to — if context is ., the root .dockerignore appliesprisma/ if Prisma is used — prisma/schema.prisma is needed for postinstallpackage-lock.json, yarn.lock, etc.) — they're essential for reproducible buildspre-deploy-checklist — Checks for .dockerignore existence and flags missing onesdockerfile-generation — Generate .dockerignore alongside the Dockerfiletools
Compressed catalog of all Nixopus API operations for the nixopus_api() tool
development
Deploy static file sites — Caddy/nginx serving, Staticfile config, and Dockerfile patterns. Use when deploying a static HTML site with no server-side runtime, or when index.html or a Staticfile is detected at the project root.
devops
Deploy shell script applications — interpreter detection, setup scripts, and Dockerfile patterns. Use when deploying a shell script project, or when start.sh is detected.
development
Self-healing loop for failed deployments — diagnose, fix, redeploy up to 3 attempts, then escalate or rollback. Load when a deployment fails or build errors occur.