mirror of
https://github.com/benbjohnson/litestream.git
synced 2026-01-25 05:06:30 +00:00
17 lines
507 B
Docker
17 lines
507 B
Docker
FROM golang:1.25 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:3.20
|
|
COPY --from=builder /usr/local/bin/litestream /usr/local/bin/litestream
|
|
ENTRYPOINT ["/usr/local/bin/litestream"]
|
|
CMD []
|