From 2c2605d0169bd6264d302cef8874013ad72cec3d Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 18 Mar 2024 18:26:14 +0100 Subject: [PATCH] Improve Dockerfile Signed-off-by: Knut Ahlers --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4074116..f159a89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ FROM golang:alpine as builder -COPY . /go/src/github.com/Luzifer/share -WORKDIR /go/src/github.com/Luzifer/share +COPY . /src/share +WORKDIR /src/share RUN set -ex \ && apk add --update git \ && go install \ -ldflags "-X main.version=$(git describe --tags --always || echo dev)" \ - -mod=readonly + -mod=readonly \ + -modcacherw \ + -trimpath + FROM alpine:latest