Install
openclaw skills install dockerignore-linterLint, validate, and audit .dockerignore files for syntax issues, security risks, missing patterns, and optimization opportunities. Use when asked to lint, validate, audit, or check .dockerignore files, optimize Docker build context, reduce Docker image size, or review what files are included in Docker builds. Triggers on "lint dockerignore", "check .dockerignore", "docker context", "docker build size", "audit dockerignore".
openclaw skills install dockerignore-linterLint .dockerignore files for syntax issues, security risks, missing essential patterns, and optimization opportunities.
All commands use the bundled Python script at scripts/dockerignore_linter.py.
python3 scripts/dockerignore_linter.py lint <file> [--strict] [--format text|json|markdown]
Run all validation rules.
python3 scripts/dockerignore_linter.py security <file> [--format text|json|markdown]
Check if secrets, credentials, and sensitive files are properly excluded.
python3 scripts/dockerignore_linter.py suggest [--project-type node|python|go|rust|java|ruby|generic] [--format text|json]
Generate recommended .dockerignore patterns for a project type.
python3 scripts/dockerignore_linter.py context <directory> [--dockerignore <file>] [--format text|json]
Show which files would be included in the Docker build context, with size breakdown.
! overrides a previous exclusion (likely unintended).env not excluded (may contain secrets).git directory not excluded (exposes history + credentials)* without specific negations)Text, JSON, Markdown — same structure as other linters.
- name: Lint Dockerignore
run: python3 scripts/dockerignore_linter.py lint .dockerignore --strict
Exit codes: 0 = clean, 1 = issues found.