From b1437c666491f032ce4bc5ad1b9d35a1d3e80173 Mon Sep 17 00:00:00 2001 From: dean Date: Wed, 23 Oct 2024 17:52:22 +0100 Subject: [PATCH 1/2] feat: match dockerfile to cron --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65645068..ac2ea109 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,4 @@ -FROM golang:1.17-alpine as builder - -ARG DB_TYPE=trivy +FROM golang:1.22-alpine as builder WORKDIR /build COPY . /build @@ -8,7 +6,13 @@ SHELL ["/bin/sh", "-o", "pipefail", "-c"] RUN apk --no-cache add make gzip -RUN DB_TYPE=${DB_TYPE} make db-all +RUN go install +RUN make db-fetch-langs +RUN make db-fetch-vuln-list +RUN make build +RUN make db-build +RUN make db-compact +RUN make db-compress FROM scratch -COPY --from=builder /build/assets/trivy*.db.gz . +COPY --from=builder /build/assets/db.tar.gz . From a23c72356177c9f944d4403f91f1a5fa08abd4ad Mon Sep 17 00:00:00 2001 From: dean Date: Wed, 23 Oct 2024 17:54:06 +0100 Subject: [PATCH 2/2] fix: run go mod download instead --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ac2ea109..956f7898 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ SHELL ["/bin/sh", "-o", "pipefail", "-c"] RUN apk --no-cache add make gzip -RUN go install +RUN go mod download RUN make db-fetch-langs RUN make db-fetch-vuln-list RUN make build