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

> Use absolute WORKDIR.

Use absolute WORKDIR.

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

## Description

Using a relative `WORKDIR` without first setting an absolute path can lead to unexpected results if the base image changes its working directory.

## Examples

### Problematic code

```dockerfile theme={null}
FROM nginx
WORKDIR usr/share/nginx/html
```

### Correct code

```dockerfile theme={null}
FROM nginx
WORKDIR /usr/share/nginx/html
```

## Reference

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