From eb87d7ad8d09ff883c50e33a18ede5060ebd8e14 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 6 Mar 2021 23:56:16 +0100 Subject: [PATCH] Update Dockerfile for go modules Signed-off-by: Knut Ahlers --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 820ce72..def0937 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,17 @@ WORKDIR /go/src/github.com/Luzifer/badge-gen RUN set -ex \ && apk add --update git \ - && go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" + && go install \ + -ldflags "-X main.version=$(git describe --tags --always || echo dev)" \ + -mod=readonly FROM alpine:latest LABEL maintainer "Knut Ahlers " RUN set -ex \ - && apk --no-cache add ca-certificates + && apk --no-cache add \ + ca-certificates COPY --from=builder /go/bin/badge-gen /usr/local/bin/badge-gen