mirror of
https://github.com/sstent/containers.git
synced 2025-12-06 08:01:51 +00:00
13 lines
597 B
Docker
13 lines
597 B
Docker
FROM golang:1.16-alpine as builder
|
|
WORKDIR /src
|
|
ARG LITESTREAM_VERSION=v0.3.5
|
|
|
|
RUN apk add --no-cache --virtual .run-deps git gcc musl-dev && rm -rf /var/cache/apk/*
|
|
RUN git clone --depth 1 --branch v0.3.5 https://github.com/benbjohnson/litestream.git
|
|
WORKDIR /src/litestream
|
|
RUN 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"]
|
|
CMD [] |