From 04743aa2f21c1261d4caf148fcc5b9fe9b407a7d Mon Sep 17 00:00:00 2001 From: Tosone Date: Fri, 27 Sep 2024 00:16:37 +0800 Subject: [PATCH] :sparkles: Update trivy repository --- build/all.alpine.Dockerfile | 4 ++-- build/all.debian.Dockerfile | 4 ++-- build/local.Dockerfile | 2 +- build/trivy.Dockerfile | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/all.alpine.Dockerfile b/build/all.alpine.Dockerfile index 749f0805..9fbe695b 100644 --- a/build/all.alpine.Dockerfile +++ b/build/all.alpine.Dockerfile @@ -52,8 +52,8 @@ RUN set -eux && \ mv trivy /usr/local/bin/trivy && \ rm trivy_"${TRIVY_VERSION}"_"${TRIVYOS}"-"${TRIVYARCH}".tar.gz && \ mkdir -p /opt/trivy/ && \ - if [ "$WITH_TRIVY_DB" = true ]; then trivy --cache-dir /opt/trivy/ image --download-java-db-only --no-progress; fi && \ - trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress + if [ "$WITH_TRIVY_DB" = true ]; then trivy --cache-dir /opt/trivy/ image --download-java-db-only --no-progress --db-repository="tosone/trivy-java-db:1"; fi && \ + trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress --db-repository="tosone/trivy-db:2" FROM --platform=$BUILDPLATFORM golang:${GOLANG_VERSION} AS skopeo diff --git a/build/all.debian.Dockerfile b/build/all.debian.Dockerfile index 4a03470a..9a29e25f 100644 --- a/build/all.debian.Dockerfile +++ b/build/all.debian.Dockerfile @@ -51,8 +51,8 @@ RUN set -eux && \ mv trivy /usr/local/bin/trivy && \ rm trivy_"${TRIVY_VERSION}"_"${TRIVYOS}"-"${TRIVYARCH}".tar.gz && \ mkdir -p /opt/trivy/ && \ - if [ "$WITH_TRIVY_DB" = true ]; then trivy --cache-dir /opt/trivy/ image --download-java-db-only --no-progress; fi && \ - trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress + if [ "$WITH_TRIVY_DB" = true ]; then trivy --cache-dir /opt/trivy/ image --download-java-db-only --no-progress --db-repository="tosone/trivy-java-db:1"; fi && \ + trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress --db-repository="tosone/trivy-db:2" FROM --platform=$BUILDPLATFORM golang:${GOLANG_VERSION} AS skopeo diff --git a/build/local.Dockerfile b/build/local.Dockerfile index 80e7f6af..b654019f 100644 --- a/build/local.Dockerfile +++ b/build/local.Dockerfile @@ -30,7 +30,7 @@ RUN set -eux && \ mv syft /usr/local/bin/syft && \ rm syft_"${SYFT_VERSION}"_"${TARGETOS}"_"${TARGETARCH}".tar.gz && \ mkdir -p /opt/trivy/ && \ - trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress + trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress --db-repository="tosone/trivy-db:2" FROM alpine:${ALPINE_VERSION} diff --git a/build/trivy.Dockerfile b/build/trivy.Dockerfile index 534ec200..9befc747 100644 --- a/build/trivy.Dockerfile +++ b/build/trivy.Dockerfile @@ -20,8 +20,8 @@ RUN set -eux && \ mv trivy /usr/local/bin/trivy && \ rm trivy_"${TRIVY_VERSION}"_"${TRIVYOS}"-"${TRIVYARCH}".tar.gz && \ mkdir -p /opt/trivy/ && \ - trivy --cache-dir /opt/trivy/ image --download-java-db-only --no-progress && \ - trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress + trivy --cache-dir /opt/trivy/ image --download-java-db-only --no-progress --db-repository="tosone/trivy-java-db:1" && \ + trivy --cache-dir /opt/trivy/ image --download-db-only --no-progress --db-repository="tosone/trivy-db:2" FROM scratch