Docker ignore configuration template and validation logic for optimizing Docker build contexts. Includes 5 required standards (build artifacts, development files, CI/CD and testing, logs and temporary files, root-only placement). Use when creating or auditing .dockerignore files to reduce build context size, improve performance, and ensure security.
Validates .dockerignore files against 5 standards for build optimization and security. Triggers when creating or auditing .dockerignore files to ensure proper exclusion of build artifacts, dev files, CI configs, logs, and root-only placement.
/plugin marketplace add metasaver/claude-marketplace/plugin install core-claude-plugin@metasaver-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill provides .dockerignore template and validation logic for optimizing Docker build contexts.
Manage .dockerignore configuration to:
This skill is invoked by the dockerignore-agent when:
The standard .dockerignore template is located at:
templates/.dockerignore.template
Must exclude build outputs: dist/, build/, .next/, out/, .turbo/, *.tsbuildinfo, node_modules/
Must exclude environment files, IDE configs, OS files, Git files:
.env* files.vscode/, .idea/.DS_Store, Thumbs.db.git/, .gitignoreMust exclude CI/CD configs, test files, coverage, documentation:
.github/, CI config filescoverage/, *.test.*, *.spec.*, __tests__/, __mocks__/docs/, *.md (except README.md)Must exclude logs and temporary files:
*.log files*.tmp, *.temp.cache/Place .dockerignore at the repository root where Docker CLI reads it. Docker uses the build context root for consistent, predictable behavior across all builds.
Benefits of root-only placement:
apps/web/node_modules/)Action: Consolidate any subdirectory .dockerignore content into the root file, then remove the nested files.
To validate a .dockerignore file:
# Check Rule 1: Build artifacts
grep -q "node_modules" .dockerignore && grep -q "dist" .dockerignore
# Check Rule 2: Development files
grep -q ".env" .dockerignore && grep -q ".vscode" .dockerignore
# Check Rule 3: CI/CD and testing
grep -q ".github" .dockerignore && grep -q "coverage" .dockerignore
# Check Rule 4: Logs and temporary
grep -q "*.log" .dockerignore && grep -q "*.tmp" .dockerignore
# Check Rule 5: No nested .dockerignore files
find . -name ".dockerignore" -not -path "./.dockerignore" | wc -l # Should be 0
!README.md to explicitly include README in builds.env*, credentials)This skill integrates with:
scope parameter. If not provided, use /skill scope-check/skill audit-workflow - Bi-directional comparison workflow/skill remediation-options - Conform/Update/Ignore choices