Description
Every Dockerfile must contain at least oneFROM instruction to define a build stage.
A file with only ARG, RUN, COPY, or other instructions but no FROM always fails
at build time with:
- A
FROMline was accidentally deleted during a refactor - An AI-generated patch removed or failed to include a
FROMinstruction - A Dockerfile fragment was saved as a standalone file
Examples
Bad
Good
Related Rules
hadolint/DL3061detects non-ARGinstructions that appear before the firstFROM. When noFROMexists at all,tally/require-stagesfires first and DL3061 is not reached.