mirror of
https://github.com/Luzifer/badge-gen.git
synced 2024-12-20 16:41:16 +00:00
Update Dockerfile for go modules
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
2502ab0896
commit
eb87d7ad8d
1 changed files with 5 additions and 2 deletions
|
@ -5,14 +5,17 @@ WORKDIR /go/src/github.com/Luzifer/badge-gen
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk add --update git \
|
&& 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
|
FROM alpine:latest
|
||||||
|
|
||||||
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
||||||
|
|
||||||
RUN set -ex \
|
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
|
COPY --from=builder /go/bin/badge-gen /usr/local/bin/badge-gen
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue