# Before — standard Node image, ~500 packages, ~30 CVEs
FROM node:20
WORKDIR /app
COPY . .
RUN -weight: 500;">npm ci --omit=dev
CMD ["node", "server.js"] # After — Docker Hardened Image, minimal footprint, 0 known CVEs
FROM -weight: 500;">docker.io/-weight: 500;">docker/hardened-node:20
WORKDIR /app
COPY --chown=nonroot:nonroot . .
RUN -weight: 500;">npm ci --omit=dev
USER nonroot
CMD ["node", "server.js"]
# Before — standard Node image, ~500 packages, ~30 CVEs
FROM node:20
WORKDIR /app
COPY . .
RUN -weight: 500;">npm ci --omit=dev
CMD ["node", "server.js"] # After — Docker Hardened Image, minimal footprint, 0 known CVEs
FROM -weight: 500;">docker.io/-weight: 500;">docker/hardened-node:20
WORKDIR /app
COPY --chown=nonroot:nonroot . .
RUN -weight: 500;">npm ci --omit=dev
USER nonroot
CMD ["node", "server.js"]
# Before — standard Node image, ~500 packages, ~30 CVEs
FROM node:20
WORKDIR /app
COPY . .
RUN -weight: 500;">npm ci --omit=dev
CMD ["node", "server.js"] # After — Docker Hardened Image, minimal footprint, 0 known CVEs
FROM -weight: 500;">docker.io/-weight: 500;">docker/hardened-node:20
WORKDIR /app
COPY --chown=nonroot:nonroot . .
RUN -weight: 500;">npm ci --omit=dev
USER nonroot
CMD ["node", "server.js"] - ~70% of container images have high or critical CVEs on day one
- A typical node:20 base image includes 400+ packages
- Around 60% of those packages are never used by the app itself - Minimal attack surface — stripped to runtime dependencies only
- CVE-free at release — zero known vulnerabilities when the image ships
- No shell by default — no bash, no sh, no unnecessary entry points
- Signed & verifiable — Sigstore/cosign image signing included
- SLSA provenance — full supply chain attestation
- Regular patched releases — fast, predictable patch cadence
- Non-root user by default — runs as nonroot out of the box
- Multi-arch support — works on amd64 and arm64 - Pick your runtime — Node, Python, Go, Java — DHI has you covered
- Swap the FROM line in your Dockerfile
- Run a vulnerability scan — compare it to your current image
- Adjust your debug workflow — ephemeral containers, structured logs