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

> Do not use --platform flag with constant value in FROM.

Do not use --platform flag with constant value in FROM.

> **Superseded by [`buildkit/FromPlatformFlagConstDisallowed`](../buildkit/FromPlatformFlagConstDisallowed)**, which provides the same check with
> improved diagnostics.

## Description

Using a hardcoded `--platform` value in `FROM` restricts image building to a single target platform. Use `$BUILDPLATFORM` or similar variables
instead.

## Examples

### Problematic code

```dockerfile theme={null}
FROM --platform=linux/amd64 alpine
```

### Correct code

```dockerfile theme={null}
FROM --platform=${BUILDPLATFORM} alpine
```

## Reference

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