Add version to Dockerfile
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
FROM golang:1.16 as builder
|
||||
WORKDIR /src/litestream
|
||||
COPY . .
|
||||
ARG LITESTREAM_VERSION=latest
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
--mount=type=cache,target=/go/pkg \
|
||||
go build -ldflags '-s -w -extldflags "-static"' -tags osusergo,netgo,sqlite_omit_load_extension -o /usr/local/bin/litestream ./cmd/litestream
|
||||
go build -ldflags "-s -w -X 'main.Version=${LITESTREAM_VERSION}' -extldflags '-static'" -tags osusergo,netgo,sqlite_omit_load_extension -o /usr/local/bin/litestream ./cmd/litestream
|
||||
|
||||
FROM alpine
|
||||
COPY --from=builder /usr/local/bin/litestream /usr/local/bin/litestream
|
||||
|
||||
Reference in New Issue
Block a user