Add docker multiarch build and push to release
Co-authored-by: Ben Johnson <benbjohnson@yahoo.com>
This commit is contained in:
committed by
Ben Johnson
parent
8589111717
commit
1a630aed04
@@ -1,11 +1,15 @@
|
||||
FROM golang:1.16 as builder
|
||||
FROM golang:1.17 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 -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
|
||||
ENTRYPOINT ["/usr/local/bin/litestream"]
|
||||
|
||||
Reference in New Issue
Block a user