dockerfile-validator

Validate Dockerfiles for security, hardening, and best-practice compliance.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/ToanPV90/dotfiles --skill dockerfile-validator-toanpv90
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dockerfile-validator
Source: https://github.com/ToanPV90/dotfiles/tree/main/claude/.claude/skills/dockerfile-validator
Command: npx skills add https://github.com/ToanPV90/dotfiles --skill dockerfile-validator-toanpv90

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Prevent insecure or non-reproducible Dockerfiles from reaching production by catching hardening, secrets, and best-practice issues early.

Core Features & Use Cases

  • Deterministic Dockerfile validation with severity-bucket reporting (Critical/High/Medium/Low) suitable for pre-merge reviews and audits.
  • Targeted reference-assisted guidance that only loads the relevant security/optimization/best-practice docs when findings exist.
  • Guardrailed fallbacks for constrained environments where the primary validation tooling cannot run.

Quick Start

Run the validator against your Dockerfile by executing: bash devops-skills-plugin/skills/dockerfile-validator/scripts/dockerfile-validate.sh Dockerfile.

Frequently Asked Questions about dockerfile-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Dockerfile for security and best practices before merging?▼

You validate a Dockerfile by running the dockerfile-validate.sh script against it to enforce security, hardening, and best-practice compliance before CI/CD or production container builds.

What is Dockerfile hardening and when do I need it?▼

Dockerfile hardening prevents insecure or non-reproducible containers from reaching production by catching secrets, misconfigurations, and weak defaults early during pre-merge reviews and production readiness audits.

How do I lint a Dockerfile to detect secrets and enforce container hardening?▼

Lint a Dockerfile by executing the validation script, which performs ordered deterministic execution with severity classification and conditional reference loading to detect secrets and enforce container hardening.

Can I run Dockerfile validation in a constrained environment where primary tooling fails?▼

Yes, the validator includes guardrailed fallbacks for constrained environments, ensuring standardized PASS or FAIL reporting with actionable fix guidance even when primary validation tooling cannot run.

Does Dockerfile validation provide severity-bucket reporting for CI/CD pipelines?▼

Yes, the validator provides deterministic Dockerfile validation with severity-bucket reporting across Critical, High, Medium, and Low levels, making it suitable for pre-merge reviews and automated audits.

What is the best way to audit Dockerfile production readiness?▼

Audit Dockerfile production readiness by running the validation script, which requires explicit Dockerfile input verification and outputs standardized reporting with actionable fix guidance for identified issues.