From 1a1dca3a398027c5ccfa4f0fc0ee49e51ec78375 Mon Sep 17 00:00:00 2001 From: Niko Ebener Date: Thu, 11 Mar 2021 13:48:31 +0100 Subject: [PATCH] caching go mod --- ldp/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ldp/Dockerfile b/ldp/Dockerfile index 88a95f1..b74be16 100644 --- a/ldp/Dockerfile +++ b/ldp/Dockerfile @@ -14,10 +14,12 @@ FROM golang:1.15 AS build -ADD . /go/src/github.com/membrane/local-directory-provisioner/ldp +ADD go.mod /go/src/github.com/membrane/local-directory-provisioner/ldp/ +ADD go.sum /go/src/github.com/membrane/local-directory-provisioner/ldp/ WORKDIR /go/src/github.com/membrane/local-directory-provisioner/ldp ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64 RUN go mod download +ADD . /go/src/github.com/membrane/local-directory-provisioner/ldp RUN go build -a -ldflags '-extldflags "-static"' -o /go/bin/local-directory-provisioner local-directory-provisioner.go