This example demonstrates a multi-stage Docker build with integrated security scanning.
- Aqua Microscanner has been deprecated for several years
- Trivy is the modern replacement and actively maintained successor
- Trivy provides better vulnerability detection and performance
The security scanning stage (Stage 5) now uses:
- ✅ Trivy: Modern, fast, and comprehensive vulnerability scanner
- ❌
Microscanner: Deprecated and no longer maintained
-
Build the image:
docker build -t scanning-example . -
Build specific stages:
# Build and run security scan docker build --target audit -t scanning-example:audit . # Build production image docker build --target prod -t scanning-example:prod .
-
Run in development:
docker-compose up
This example uses Node.js 10 which may have compatibility issues with newer package-lock.json formats. Consider updating to a more recent Node.js version for production use.