Interview Prep/DevSecOps/Container image and IaC scanning

Hadolint fails with `DL3008 Pin versions in apt get install` on every Dockerfile

BeginnerTroubleshootingContainer image and IaC scanning
Answer

Likely causes → Packages installed without versions make builds non-reproducible, so the rule fires.

Diagnose → hadolint Dockerfile

Fix → Pin where it matters or document an ignore:

RUN apt-get update && apt-get install -y --no-install-recommends curl=8.5.0-2ubuntu10.6 \
 && rm -rf /var/lib/apt/lists/*

Or in .hadolint.yaml: ignored: [DL3008] with a team decision recorded.

Prevent → Agree a Dockerfile standard once; pinned base image digests matter more than every apt version.

All DevSecOps questions

More on Container image and IaC scanning