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

> Duplicate stage names are not allowed.

Duplicate stage names are not allowed.

> **Superseded by [`buildkit/DuplicateStageName`](../buildkit/DuplicateStageName)**, which provides the same check.

## Description

Defining multiple stages with the same name results in an error because the builder is unable to uniquely resolve the stage name reference.

## Examples

### Problematic code

```dockerfile theme={null}
FROM debian:latest AS builder
RUN apt-get update

FROM golang:latest AS builder
```

### Correct code

```dockerfile theme={null}
FROM debian:latest AS deb-builder
RUN apt-get update

FROM golang:latest AS go-builder
```

## Reference

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