Dockerfile Validator
Check Dockerfile parser directives, stage structure, selected JSON instruction forms, heredoc boundaries and numeric COPY stage references.
Find Dockerfile Static Syntax Errors
Dockerfile Validator: how to use it
- Paste a Dockerfile, open a UTF-8 file or select Load example.
- Select Check Dockerfile. Review each line number, correct the relevant instruction and rerun the check.
- Download the JSON findings. Review context files, image availability and command behavior separately before building.
Limits and notes
Checks the standard Dockerfile 1.x syntax subset, selected instruction shapes and up to 40 findings. Supports LF and CRLF, simple literal heredoc markers, up to 250,000 characters and UTF-8 files up to 1 MB. Custom frontends, path existence, variable expansion and runtime behavior need separate checks.
How your privacy works →Dockerfile Validator: common questions
Can a Dockerfile use an image or a named context in COPY --from?
Yes. This tool checks numeric stage references and known self-references. An unfamiliar nonnumeric name can refer to an external context or image, which requires build configuration evidence.
Does the JSON check execute a command?
It checks that the supported exec form parses as an array of strings. Command execution and filesystem checks are outside its scope.
When is an escape directive active?
An escape directive has to appear with the initial parser directives. After an ordinary comment, a blank line or an instruction, a line written as a directive is treated as a comment.