From 7f408ee33fea5f63994d6ac8f0cf01a568f16482 Mon Sep 17 00:00:00 2001 From: Eduardo Bravo Date: Mon, 19 Feb 2024 03:43:45 -0400 Subject: [PATCH] Update Dockerfile added option `go mod verify` for pre-downloading dependencies and only redownloading them in subsequent builds if they change. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c6833e6..72f3298 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ LABEL maintainer="Eduardo Bravo " RUN apk --no-cache add ca-certificates && update-ca-certificates WORKDIR /src COPY ./go.mod ./go.sum ./ -RUN go mod download +RUN go mod download && go mod verify COPY ./ ./ RUN CGO_ENABLED=0 GOFLAGS="-tags=timetzdata" \ go build -ldflags="-s -w" -trimpath -o ./dist/ ./...