From 590f6df48d3fdcef4f831992025c25c3eda3bcb7 Mon Sep 17 00:00:00 2001 From: Tiger Kaovilai Date: Tue, 12 Nov 2024 16:33:42 -0500 Subject: [PATCH] Cache module dependencies between container builds Signed-off-by: Tiger Kaovilai --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 25b314a1115..8654e656a21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,9 @@ ENV CGO_ENABLED=0 \ WORKDIR /go/src/github.com/vmware-tanzu/velero +COPY go.mod go.sum /go/src/github.com/vmware-tanzu/velero/ +RUN go mod download + COPY . /go/src/github.com/vmware-tanzu/velero RUN mkdir -p /output/usr/bin && \