> ## 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)


## Related topics

- [tally/invalid-onbuild-trigger](https://tally.wharflab.com/rules/tally/invalid-onbuild-trigger.md)
- [Hadolint rules](https://tally.wharflab.com/rules/hadolint/overview.md)
- [hadolint/DL3000](https://tally.wharflab.com/rules/hadolint/DL3000.md)
- [hadolint/DL3001](https://tally.wharflab.com/rules/hadolint/DL3001.md)
- [hadolint/DL3002](https://tally.wharflab.com/rules/hadolint/DL3002.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.