Skip to content

hadolint/DL3061

Invalid instruction order. Dockerfile must begin with FROM, ARG or comment.

Property Value
Severity Error
Category Correctness
Default Enabled

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