diff --git a/Dockerfile b/Dockerfile index 44348b4..d579c5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:alpine3.18 AS common +FROM golang:alpine3.19 AS common RUN apk add gcc libc-dev @@ -8,13 +8,15 @@ COPY go.mod go.sum ./ RUN go mod download COPY *.go ./ +# CGO_CFLAGS to mitigate https://github.com/mattn/go-sqlite3/issues/1164 + FROM common AS test -RUN go test -ldflags="-s -w" +RUN CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go test -ldflags="-s -w" FROM common AS build -RUN go build -ldflags="-s -w" +RUN CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go build -ldflags="-s -w" -FROM alpine:3.18 AS executable +FROM alpine:3.19 AS executable RUN apk add tzdata