fix: dockerfile
parent
f7434d3cdb
commit
7ef789b419
15
Dockerfile
15
Dockerfile
|
@ -1,12 +1,3 @@
|
|||
FROM golang:1.16.2-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN apk add git
|
||||
|
||||
RUN VERSION=$(git describe --exact-match 2>/dev/null || git rev-parse --short HEAD)
|
||||
RUN go build -ldflags="-X github.com/sundowndev/goreleaser-template/version.Version=${VERSION}" -v -o myproject .
|
||||
|
||||
ENTRYPOINT ["/app/myproject"]
|
||||
FROM scratch
|
||||
COPY myproject /usr/bin/myproject
|
||||
ENTRYPOINT ["/usr/bin/myproject"]
|
Loading…
Reference in New Issue