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

> Use the `-y` switch.

Use the `-y` switch.

| Property | Value         |
| -------- | ------------- |
| Severity | Warning       |
| Category | Best Practice |
| Default  | Enabled       |
| Auto-fix | Yes (`--fix`) |

## Description

Without the `--assume-yes` (`-y`) option it might be possible that the build breaks without human intervention. Always use `-y` with `apt-get install`
to avoid interactive prompts during the build.

## Examples

### Problematic code

```dockerfile theme={null}
FROM debian
RUN apt-get install python=2.7
```

### Correct code

```dockerfile theme={null}
FROM debian
RUN apt-get install -y python=2.7
```

## Auto-fix

Adds `-y` flag to `apt-get install` commands.

```dockerfile theme={null}
# Before
RUN apt-get install curl

# After (with --fix)
RUN apt-get install -y curl
```

## Reference

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