Skip to content

Instantly share code, notes, and snippets.

@iandesj
Created September 28, 2023 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iandesj/0e8a7121ca789592eeec962fe54ac18c to your computer and use it in GitHub Desktop.
Save iandesj/0e8a7121ca789592eeec962fe54ac18c to your computer and use it in GitHub Desktop.
Build && Scan
#! /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