Ensure no manual input in 'apt install'

-y flag in apt, Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package or removing an essential package, occurs then apt-get will abort.

Risk Level: medium
Platform: Docker
Spectral Rule ID: DOCKR006

REMEDIATION

use -y flag in each use of apt-get install

FROM ubuntu:18.04
RUN apt-get update && \
- apt-get install \
+ apt-get install -y \
  build-essential \
  cmake \
  curl \
  file \
  git \
  musl-dev \
  musl-tools \
  pkg-config \
  sudo \
  xutils-dev \
  zip \
  && apt-get clean && rm -rf /var/lib/apt/lists/*

Read more: