Created
September 28, 2023 14:22
-
-
Save iandesj/0e8a7121ca789592eeec962fe54ac18c to your computer and use it in GitHub Desktop.
Build && Scan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Build and scan with trivy | |
IMAGE_TAG=$1 | |
DOCKERFILE="${2:-Dockerfile}" | |
docker build -t $IMAGE_TAG . -f $DOCKERFILE \ | |
&& trivy image --severity HIGH,CRITICAL $IMAGE_TAG --report summary --scanners vuln |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment