Scan an image with Trivy
Fails the pipeline if HIGH or CRITICAL CVEs are found
trivy image --exit-code 1 --severity HIGH,CRITICAL img:tag
- tool
- docker46 commands
More docker commands
-
docker sbom img:tagGenerates a Software Bill of Materials for an image (Docker Desktop)
-
docker inspect <container> | jq '.[0].NetworkSettings.Networks'Shows the network settings of a running container
-
docker compose up -d --buildBuilds and starts all services in the background
-
docker compose logs -f --tail=100 <service>Shows the last 100 lines of a compose service and keeps following
-
docker compose down -vStops and removes containers, networks and volumes