Always use -y with apt-get install

Metadata

ID: docker-best-practices/apt-get-yes

Language: Docker

Severity: Warning

Category: Best Practices

Description

When using apt-get to install a package, make sure you use the -y flag to avoid your CI being blocked on a prompt.

Non-Compliant Code Examples

RUN apt-get install gcc

Compliant Code Examples

RUN apt-get install -y gcc