mirror of
https://github.com/Luzifer/share.git
synced 2024-12-20 10:31:16 +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
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue