Last active
July 15, 2021 09:32
-
-
Save doshyt/f3f1b6d6926a9db35d5f04c46e43df04 to your computer and use it in GitHub Desktop.
Run Trivy scan from dockerimage with mounting .trivyignore file
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 | |
imageRepository="python" | |
version="3.4-alpine" | |
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /tmp/.trivyignore:/tmp/.trivyignore \ | |
aquasec/trivy image \ | |
--ignorefile /tmp/.trivyignore \ | |
--no-progress --exit-code 1 \ | |
${imageRepository}:${version} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment