2 DL3061
Moritz Röhrich edited this page 2025-08-12 13:23:06 +02:00

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

Problematic code:

COPY . /foobar

Correct code:

FROM scratch

COPY . /foobar

Rationale:

Dockerfiles must begin with FROM, ARG or a comment. Otherwise there will be a build error.