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

> Always tag the version of an image explicitly.

Always tag the version of an image explicitly.

| Property | Value         |
| -------- | ------------- |
| Severity | Warning       |
| Category | Best Practice |
| Default  | Enabled       |

## Description

You can never rely that the `latest` tag is a specific version. Always tag the version of an image explicitly to ensure reproducible builds.

## Examples

### Problematic code

```dockerfile theme={null}
FROM debian
```

### Correct code

```dockerfile theme={null}
FROM debian:jessie
```

### Exception

When the image name refers to a previously defined alias, tagging is not required:

```dockerfile theme={null}
FROM debian:jessie as build
RUN build_script

FROM build as tests
RUN test_script

FROM debian:jessie
COPY --from=build foo .
```

## Reference

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