fix: update go versions in mod and docker

- Update Go module to v1.19 format
- Docker builder pinned to Go v1.20.1
- Alpine image pinned to 3.17.2 (rather than `latest`)
This commit is contained in:
Tyler Davis
2023-02-21 20:08:36 +00:00
committed by Ben Johnson
parent 8dbdf2b91c
commit 6bbced3d46
3 changed files with 35 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
FROM golang:1.17 as builder
FROM golang:1.20.1 as builder
WORKDIR /src/litestream
COPY . .
@@ -10,7 +10,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
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
FROM alpine:3.17.2
COPY --from=builder /usr/local/bin/litestream /usr/local/bin/litestream
ENTRYPOINT ["/usr/local/bin/litestream"]
CMD []