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

> Use the `-y` switch to avoid manual input: `yum install -y <package>`.

Use the `-y` switch to avoid manual input: `yum install -y <package>`.

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

## Description

Without the `-y` flag or the equivalent `--assumeyes` flag, `yum` will not successfully install a package because human input is expected. In a
Dockerfile `RUN` instruction there is no interactive terminal, so the build will fail.

## Examples

### Problematic code

```dockerfile theme={null}
FROM centos
RUN yum install httpd-2.24.4 && yum clean all
```

### Correct code

```dockerfile theme={null}
FROM centos
RUN yum install -y httpd-2.24.4 && yum clean all
```

## Auto-fix

Adds `-y` flag to `yum install`, `groupinstall`, `localinstall`, and `reinstall` commands.

## Reference

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


## Related topics

- [Hadolint rules](/rules/hadolint/overview.md)
- [hadolint/DL3020](/rules/hadolint/DL3020.md)
- [hadolint/DL3021](/rules/hadolint/DL3021.md)
- [hadolint/DL3022](/rules/hadolint/DL3022.md)
- [hadolint/DL3023](/rules/hadolint/DL3023.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.