mirror of
https://github.com/Luzifer/share.git
synced 2024-12-20 18:41:17 +00:00
Improve Dockerfile
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
93d19426eb
commit
2c2605d016
1 changed files with 6 additions and 3 deletions
|
@ -1,13 +1,16 @@
|
||||||
FROM golang:alpine as builder
|
FROM golang:alpine as builder
|
||||||
|
|
||||||
COPY . /go/src/github.com/Luzifer/share
|
COPY . /src/share
|
||||||
WORKDIR /go/src/github.com/Luzifer/share
|
WORKDIR /src/share
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk add --update git \
|
&& apk add --update git \
|
||||||
&& go install \
|
&& go install \
|
||||||
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
|
||||||
-mod=readonly
|
-mod=readonly \
|
||||||
|
-modcacherw \
|
||||||
|
-trimpath
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue