1
0
mirror of https://github.com/Luzifer/badge-gen.git synced 2024-09-16 13:58:32 +00:00

Update Dockerfile for go modules

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-03-06 23:56:16 +01:00
parent 2502ab0896
commit eb87d7ad8d
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D

View File

@ -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 <knut@ahlers.me>"
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