> ## Documentation Index
> Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# hadolint/DL3061

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

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

```dockerfile theme={null}
COPY . /foobar
```

### Correct code

```dockerfile theme={null}
FROM scratch
COPY . /foobar
```

## Reference

* [hadolint/DL3061](https://github.com/hadolint/hadolint/wiki/DL3061)
