Commit 8f3afd05 authored by Girija Saint-Ange's avatar Girija Saint-Ange
Browse files

Merge branch '102-unnecessary-download-of-trivy-databases' into 'master'

Resolve "Unnecessary download of Trivy databases"

Closes #102

See merge request to-be-continuous/docker!134
parents 68210cf8 0c417fd9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -996,8 +996,7 @@ docker-trivy:
    mkdir -p ./reports
    if [[ -z "${DOCKER_TRIVY_ADDR}" ]]; then
      log_warn "\\e[93mYou are using Trivy in standalone mode. To get faster scans, consider setting the DOCKER_TRIVY_ADDR variable to the address of a Trivy server. More info here: https://aquasecurity.github.io/trivy/latest/docs/references/modes/client-server/\\e[0m"
      trivy image --download-db-only ${DOCKER_TRIVY_DB_REPOSITORY:+--db-repository $DOCKER_TRIVY_DB_REPOSITORY} ${DOCKER_TRIVY_JAVA_DB_REPOSITORY:+--java-db-repository $DOCKER_TRIVY_JAVA_DB_REPOSITORY}
      export trivy_opts="image"
      export trivy_opts="image ${DOCKER_TRIVY_DB_REPOSITORY:+--db-repository $DOCKER_TRIVY_DB_REPOSITORY}"
    else
      log_info "You are using Trivy in client/server mode with the following server: ${DOCKER_TRIVY_ADDR}"
      export trivy_opts="image --server ${DOCKER_TRIVY_ADDR}"