> ## 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/DL3043

> `ONBUILD`, `FROM` or `MAINTAINER` triggered from within `ONBUILD` instruction.

`ONBUILD`, `FROM` or `MAINTAINER` triggered from within `ONBUILD` instruction.

| Property | Value       |
| -------- | ----------- |
| Severity | Error       |
| Category | Correctness |
| Default  | Enabled     |

## Description

The `ONBUILD` instruction does not allow `ONBUILD`, `FROM`, or `MAINTAINER` as nested instructions. Using any of these within an `ONBUILD` trigger is
an error and will cause a build failure.

## Examples

### Problematic code

```dockerfile theme={null}
ONBUILD ONBUILD /bin/true
ONBUILD FROM debian
ONBUILD MAINTAINER Ron Weasley
```

## Reference

* [hadolint/DL3043](https://github.com/hadolint/hadolint/wiki/DL3043)
* [Dockerfile ONBUILD reference](https://docs.docker.com/engine/reference/builder/#onbuild)
