Skip to content
Moritz Röhrich edited this page Aug 12, 2025 · 2 revisions

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.

Clone this wiki locally