From 1a562e0a037f364ee6da9474f3605ffc09ff62cd Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 29 Nov 2022 17:36:49 +0100 Subject: [PATCH] Dockerfile: better cache when downloading go modules Signed-off-by: CrazyMax --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 18cf709c..fb235c5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ ARG XX_VERSION="1.1.2" FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base -COPY --link --from=xx / / +COPY --from=xx / / ENV CGO_ENABLED=0 RUN apk add --no-cache file git WORKDIR /src @@ -40,9 +40,10 @@ RUN --mount=target=. <