From 5a2aa976117d8e8aa7ed73f4ee36e0ed9a75dee8 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Thu, 7 Sep 2023 03:23:35 +0200 Subject: [PATCH] chore:sped up local builds by using a separate go mod download step in the Dockerfile --- server/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/Dockerfile b/server/Dockerfile index fb044b41..5345de5c 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -9,6 +9,10 @@ RUN apk update && apk add --no-cache git ca-certificates tzdata alpine-sdk bash RUN adduser -D -g '' appuser WORKDIR /app +# Copy go mod and sum files and download dependencies +COPY go.mod go.sum ./ +RUN go mod download + # Copy source code COPY . .