From ee54f4a64bbd0bb783461e94d0071236264b609d Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Mon, 11 Dec 2023 16:51:39 -0800 Subject: [PATCH] Dockerfile: bump alpinelinux to 3.19 --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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