Skip to main content
Invalid instruction order. Dockerfile must begin with FROM, ARG or comment.
PropertyValue
SeverityError
CategoryCorrectness
DefaultEnabled

Description

A Dockerfile must begin with a FROM instruction, an ARG instruction, or a comment. Any other instruction before FROM will cause a build error.

Examples

Problematic code

COPY . /foobar

Correct code

FROM scratch
COPY . /foobar

Reference